diff --git a/teensy/teensy_hal.c b/teensy/teensy_hal.c index 8996c27c9..4fcf99922 100644 --- a/teensy/teensy_hal.c +++ b/teensy/teensy_hal.c @@ -2,6 +2,7 @@ #include #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 80f320e0c..162effa85 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) ||\