From ee31f71d39207309b924ac99a7de2d847cb4bbfd Mon Sep 17 00:00:00 2001 From: Dave Hylands Date: Wed, 19 Feb 2014 22:28:36 -0800 Subject: Add EXTI support Revamp usrsw to use new exti code. Add user switch callback function. --- stm/boards/NETDUINO_PLUS_2/mpconfigboard.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'stm/boards/NETDUINO_PLUS_2') diff --git a/stm/boards/NETDUINO_PLUS_2/mpconfigboard.h b/stm/boards/NETDUINO_PLUS_2/mpconfigboard.h index 9c407d9cd..2c0e4b74c 100644 --- a/stm/boards/NETDUINO_PLUS_2/mpconfigboard.h +++ b/stm/boards/NETDUINO_PLUS_2/mpconfigboard.h @@ -18,14 +18,11 @@ #define MICROPY_HW_ENABLE_SERVO (1) #define MICROPY_HW_ENABLE_AUDIO (0) -#define USRSW_PORT (GPIOB) -#define USRSW_PIN (GPIO_Pin_11) +// USRSW is pulled low. Pressing the button makes the input go high. +#define USRSW_PIN (pin_B11) #define USRSW_PUPD (GPIO_PuPd_NOPULL) -#define USRSW_EXTI_PIN (EXTI_PinSource11) -#define USRSW_EXTI_PORT (EXTI_PortSourceGPIOB) -#define USRSW_EXTI_LINE (EXTI_Line11) -#define USRSW_EXTI_IRQN (EXTI15_10_IRQn) #define USRSW_EXTI_EDGE (EXTI_Trigger_Rising) +#define USRSW_PRESSED (1) /* LED */ #define PYB_LED1_PORT (GPIOA) // Blue LED -- cgit v1.2.3