summaryrefslogtreecommitdiffstatshomepage
path: root/stm/boards/STM32F4DISC/mpconfigboard.h
diff options
context:
space:
mode:
Diffstat (limited to 'stm/boards/STM32F4DISC/mpconfigboard.h')
-rw-r--r--stm/boards/STM32F4DISC/mpconfigboard.h11
1 files changed, 4 insertions, 7 deletions
diff --git a/stm/boards/STM32F4DISC/mpconfigboard.h b/stm/boards/STM32F4DISC/mpconfigboard.h
index 2708504cb0..1e26f730ec 100644
--- a/stm/boards/STM32F4DISC/mpconfigboard.h
+++ b/stm/boards/STM32F4DISC/mpconfigboard.h
@@ -14,14 +14,11 @@
#define MICROPY_HW_ENABLE_SERVO (0)
#define MICROPY_HW_ENABLE_AUDIO (0)
-#define USRSW_PORT (GPIOA)
-#define USRSW_PIN (GPIO_Pin_0)
+// USRSW is pulled low. Pressing the button makes the input go high.
+#define USRSW_PIN (pin_A0)
#define USRSW_PUPD (GPIO_PuPd_NOPULL)
-#define USRSW_EXTI_PIN (EXTI_PinSource0)
-#define USRSW_EXTI_PORT (EXTI_PortSourceGPIOA)
-#define USRSW_EXTI_LINE (EXTI_Line0)
-#define USRSW_EXTI_IRQN (EXTI0_IRQn)
-#define USRSW_EXTI_EDGE (EXTI_Trigger_Falling)
+#define USRSW_EXTI_EDGE (EXTI_Trigger_Rising)
+#define USRSW_PRESSED (1)
/* LED */
#define PYB_LED1_PORT (GPIOD)