-static void
-ao_quadrature_debounce_init(struct ao_debounce *debounce) {
- debounce->hold = AO_QUADRATURE_DEBOUNCE_HOLD;
- debounce->_get = _ao_quadrature_get;
- debounce->_set = _ao_quadrature_set;
-}
-
-#define init(q) do { \
- ao_enable_port(port(q)); \
- ao_quadrature_debounce_init(&ao_quadrature_debounce[q]); \
- ao_exti_setup(port(q), bita(q), \
- AO_QUADRATURE_MODE|AO_EXTI_MODE_FALLING|AO_EXTI_MODE_RISING|AO_EXTI_PRIORITY_MED, \
- ao_quadrature_isr); \
- ao_exti_enable(port(q), bita(q)); \
- \
- ao_exti_setup(port(q), bitb(q), \
- AO_QUADRATURE_MODE|AO_EXTI_MODE_FALLING|AO_EXTI_MODE_RISING|AO_EXTI_PRIORITY_MED, \
- ao_quadrature_isr); \
- ao_exti_enable(port(q), bitb(q)); \
+#define init(q) do { \
+ ao_enable_input(port(q), bita(q), 0); \
+ ao_enable_input(port(q), bitb(q), 0); \