diff options
author | Dave Hylands <dhylands@gmail.com> | 2014-02-19 22:28:36 -0800 |
---|---|---|
committer | Dave Hylands <dhylands@gmail.com> | 2014-02-23 11:26:22 -0800 |
commit | ee31f71d39207309b924ac99a7de2d847cb4bbfd (patch) | |
tree | a7d5022579bbe988c2dac79c7a99c56557ef8b52 /stm/boards/PYBOARD3/mpconfigboard.h | |
parent | 790eed6f93dc12df40715ad1062b5ce01badcbd9 (diff) | |
download | micropython-ee31f71d39207309b924ac99a7de2d847cb4bbfd.tar.gz micropython-ee31f71d39207309b924ac99a7de2d847cb4bbfd.zip |
Add EXTI support
Revamp usrsw to use new exti code.
Add user switch callback function.
Diffstat (limited to 'stm/boards/PYBOARD3/mpconfigboard.h')
-rw-r--r-- | stm/boards/PYBOARD3/mpconfigboard.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/stm/boards/PYBOARD3/mpconfigboard.h b/stm/boards/PYBOARD3/mpconfigboard.h index 1632445741..88573e2b16 100644 --- a/stm/boards/PYBOARD3/mpconfigboard.h +++ b/stm/boards/PYBOARD3/mpconfigboard.h @@ -14,14 +14,11 @@ #define MICROPY_HW_ENABLE_SERVO (1) #define MICROPY_HW_ENABLE_AUDIO (0) -#define USRSW_PORT (GPIOA) -#define USRSW_PIN (GPIO_Pin_13) +// USRSW has no pullup or pulldown, and pressing the switch makes the input go low +#define USRSW_PIN (pin_A13) #define USRSW_PUPD (GPIO_PuPd_UP) -#define USRSW_EXTI_PIN (EXTI_PinSource13) -#define USRSW_EXTI_PORT (EXTI_PortSourceGPIOA) -#define USRSW_EXTI_LINE (EXTI_Line13) -#define USRSW_EXTI_IRQN (EXTI15_10_IRQn) -#define USRSW_EXTI_EDGE (EXTI_Trigger_Rising) +#define USRSW_EXTI_EDGE (EXTI_Trigger_Falling) +#define USRSW_PRESSED (0) /* LED */ #define PYB_LED1_PORT (GPIOA) |