summaryrefslogtreecommitdiff
path: root/src/stm-demo/ao_pins.h
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2012-08-06 21:54:58 -0700
committerKeith Packard <keithp@keithp.com>2012-08-06 21:54:58 -0700
commit11046bc89b3ce6386f1005fc8476b08f54d6f5fb (patch)
tree57006f9f141c97c9fed67bdc08b1eae3e990e295 /src/stm-demo/ao_pins.h
parent5f7e61c749b02ed16e368502062e39b0471e9257 (diff)
altos: Support multiple quadrature encoders.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/stm-demo/ao_pins.h')
-rw-r--r--src/stm-demo/ao_pins.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/stm-demo/ao_pins.h b/src/stm-demo/ao_pins.h
index 1f5ef4ff..0c1ed8fc 100644
--- a/src/stm-demo/ao_pins.h
+++ b/src/stm-demo/ao_pins.h
@@ -170,8 +170,15 @@ struct ao_adc {
#define HAS_I2C_2 0
#define I2C_2_PB10_PB11 0
-#define AO_QUADRATURE_PORT &stm_gpioc
-#define AO_QUADRATURE_A 1
-#define AO_QUADRATURE_B 0
+#define AO_QUADRATURE_COUNT 2
+#define AO_QUADRATURE_MODE AO_EXTI_MODE_PULL_UP
+
+#define AO_QUADRATURE_0_PORT &stm_gpioc
+#define AO_QUADRATURE_0_A 1
+#define AO_QUADRATURE_0_B 0
+
+#define AO_QUADRATURE_1_PORT &stm_gpioc
+#define AO_QUADRATURE_1_A 3
+#define AO_QUADRATURE_1_B 2
#endif /* _AO_PINS_H_ */