aboutsummaryrefslogtreecommitdiff
path: root/stm/boards/NETDUINO_PLUS_2
diff options
context:
space:
mode:
authorDave Hylands2014-02-19 22:28:36 -0800
committerDave Hylands2014-02-23 11:26:22 -0800
commitee31f71d39207309b924ac99a7de2d847cb4bbfd (patch)
treea7d5022579bbe988c2dac79c7a99c56557ef8b52 /stm/boards/NETDUINO_PLUS_2
parent790eed6f93dc12df40715ad1062b5ce01badcbd9 (diff)
Add EXTI support
Revamp usrsw to use new exti code. Add user switch callback function.
Diffstat (limited to 'stm/boards/NETDUINO_PLUS_2')
-rw-r--r--stm/boards/NETDUINO_PLUS_2/mpconfigboard.h9
1 files changed, 3 insertions, 6 deletions
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