diff options
author | Damien George <damien.p.george@gmail.com> | 2017-06-15 17:42:18 +1000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2017-06-15 17:42:18 +1000 |
commit | a5609e1cf1a6200ad9c0294ffc4f69fb8195c518 (patch) | |
tree | 92abb9cfb31b279b3af813a99c3729623c92643a | |
parent | fd860dc552b2ec53df8c6ce7e1245206719d469b (diff) | |
download | micropython-a5609e1cf1a6200ad9c0294ffc4f69fb8195c518.tar.gz micropython-a5609e1cf1a6200ad9c0294ffc4f69fb8195c518.zip |
teensy: Provide dummy implementation of extint_register_pin.
-rw-r--r-- | teensy/teensy_hal.c | 5 | ||||
-rw-r--r-- | teensy/teensy_hal.h | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/teensy/teensy_hal.c b/teensy/teensy_hal.c index 8996c27c97..4fcf999225 100644 --- a/teensy/teensy_hal.c +++ b/teensy/teensy_hal.c @@ -2,6 +2,7 @@ #include <string.h> #include "py/mpstate.h" +#include "py/runtime.h" #include "py/mphal.h" #include "usb.h" #include "uart.h" @@ -58,3 +59,7 @@ void mp_hal_stdout_tx_strn_cooked(const char *str, size_t len) { void mp_hal_gpio_clock_enable(GPIO_TypeDef *gpio) { } + +void extint_register_pin(const void *pin, uint32_t mode, int hard_irq, mp_obj_t callback_obj) { + mp_not_implemented(NULL); +} diff --git a/teensy/teensy_hal.h b/teensy/teensy_hal.h index 80f320e0c5..162effa85c 100644 --- a/teensy/teensy_hal.h +++ b/teensy/teensy_hal.h @@ -57,6 +57,8 @@ typedef struct { #define GPIO_MODE_AF_PP ((uint32_t)0x00000002) #define GPIO_MODE_AF_OD ((uint32_t)0x00000012) #define GPIO_MODE_ANALOG ((uint32_t)0x00000003) +#define GPIO_MODE_IT_RISING ((uint32_t)1) +#define GPIO_MODE_IT_FALLING ((uint32_t)2) #define IS_GPIO_MODE(MODE) (((MODE) == GPIO_MODE_INPUT) ||\ ((MODE) == GPIO_MODE_OUTPUT_PP) ||\ |