summaryrefslogtreecommitdiff
path: root/board/nucleo-f072rb/gpio.inc
diff options
context:
space:
mode:
Diffstat (limited to 'board/nucleo-f072rb/gpio.inc')
-rw-r--r--board/nucleo-f072rb/gpio.inc12
1 files changed, 12 insertions, 0 deletions
diff --git a/board/nucleo-f072rb/gpio.inc b/board/nucleo-f072rb/gpio.inc
index 3515d5ca84..31149bf633 100644
--- a/board/nucleo-f072rb/gpio.inc
+++ b/board/nucleo-f072rb/gpio.inc
@@ -9,6 +9,16 @@
* Note: Those with interrupt handlers must be declared first. */
GPIO_INT(USER_BUTTON, PIN(C, 13), GPIO_INT_FALLING, button_event)
+#ifdef CTS_MODULE
+#ifndef CTS_MODULE_GPIO
+/* Overload C1 for interrupt. Enabled only for non-GPIO suites as
+ * GPIO tests don't require a separate notification line. */
+GPIO_INT(CTS_IRQ, PIN(C, 1), GPIO_INT_FALLING | GPIO_PULL_UP , cts_irq)
+/* Used to disable interrupt. This IRQ# has to match the number used for the
+ * pin set above */
+#define CTS_IRQ_NUMBER STM32_IRQ_EXTI0_1
+#endif
+#endif
/* Outputs */
GPIO(LED_U, PIN(A, 5), GPIO_OUT_LOW)
@@ -29,6 +39,8 @@ ALTERNATE(PIN_MASK(B, 0x00C0), GPIO_ALT_F1, MODULE_I2C, GPIO_PULL_UP)
/* CTS Signals */
GPIO(HANDSHAKE_INPUT, PIN(A, 4), GPIO_INPUT | GPIO_PULL_UP)
GPIO(HANDSHAKE_OUTPUT, PIN(B, 0), GPIO_ODR_LOW)
+#ifdef CTS_MODULE_GPIO
GPIO(INPUT_TEST, PIN(C, 1), GPIO_INPUT | GPIO_PULL_UP)
+#endif
GPIO(OUTPUT_TEST, PIN(C, 0), GPIO_ODR_LOW)
#endif