Signed-off-by: Keith Packard <keithp@keithp.com>
authorKeith Packard <keithp@keithp.com>
Tue, 7 Aug 2012 02:35:02 +0000 (19:35 -0700)
committerKeith Packard <keithp@keithp.com>
Tue, 7 Aug 2012 02:35:02 +0000 (19:35 -0700)
altos: Test quadrature driver

src/stm-demo/Makefile
src/stm-demo/ao_demo.c
src/stm-demo/ao_pins.h

index 055a73af2ffd8779d80954685359ec3188f906e2..52bb7b519698f6a9eacb35e2c381f16982a06945 100644 (file)
@@ -33,7 +33,9 @@ ALTOS_SRC = \
        ao_spi_stm.c \
        ao_adc_stm.c \
        ao_i2c_stm.c \
-       ao_usb_stm.c
+       ao_usb_stm.c \
+       ao_exti_stm.c \
+       ao_quadrature.c
 
 PRODUCT=StmDemo-v0.0
 PRODUCT_DEF=-DSTM_DEMO
index 9a581ff91a9ce4dc0ec19fa14f6ef1e01948899d..1b9813fe70f77d5a8591d250992bdf91dbdc1c12 100644 (file)
@@ -16,6 +16,8 @@
  */
 
 #include "ao.h"
+#include <ao_exti.h>
+#include <ao_quadrature.h>
 
 struct ao_task demo_task;
 
@@ -170,6 +172,8 @@ main(void)
 //     ao_lcd_font_init();
        ao_spi_init();
        ao_i2c_init();
+       ao_exti_init();
+       ao_quadrature_init();
 
        ao_timer_set_adc_interval(100);
 
index 7e22212223033d1c50363a253cf4c245708f2186..17a76bd0893594bcc2f8ff8002c22dbb4ef9a9df 100644 (file)
@@ -170,4 +170,8 @@ struct ao_adc {
 #define HAS_I2C_2              0
 #define I2C_2_PB10_PB11                0
 
+#define AO_QUADRATURE_PORT     &stm_gpioc
+#define AO_QUADRATURE_A                0
+#define AO_QUADRATURE_B                1
+
 #endif /* _AO_PINS_H_ */