From ab379493dbe9923db8e458d2f4e0344df17d331c Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Mon, 6 Aug 2012 19:35:02 -0700 Subject: [PATCH] Signed-off-by: Keith Packard altos: Test quadrature driver --- src/stm-demo/Makefile | 4 +++- src/stm-demo/ao_demo.c | 4 ++++ src/stm-demo/ao_pins.h | 4 ++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/stm-demo/Makefile b/src/stm-demo/Makefile index 055a73af..52bb7b51 100644 --- a/src/stm-demo/Makefile +++ b/src/stm-demo/Makefile @@ -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 diff --git a/src/stm-demo/ao_demo.c b/src/stm-demo/ao_demo.c index 9a581ff9..1b9813fe 100644 --- a/src/stm-demo/ao_demo.c +++ b/src/stm-demo/ao_demo.c @@ -16,6 +16,8 @@ */ #include "ao.h" +#include +#include 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); diff --git a/src/stm-demo/ao_pins.h b/src/stm-demo/ao_pins.h index 7e222122..17a76bd0 100644 --- a/src/stm-demo/ao_pins.h +++ b/src/stm-demo/ao_pins.h @@ -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_ */ -- 2.30.2