diff options
| author | David Lechner <david@pybricks.com> | 2022-07-01 15:51:12 -0500 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2022-07-18 13:50:35 +1000 |
| commit | 186be074a7e5ac7a78da2fa78aa4cacca7a3fe89 (patch) | |
| tree | 210fda7edc495c010882c876d864cfaab8ab1c7d | |
| parent | 2d8589f1a5a04b9f3f2c96b5f99f9b8e740af594 (diff) | |
teensy/teensy_hal: Use MP_REGISTER_ROOT_POINTER().
This uses MP_REGISTER_ROOT_POINTER() to register pyb_stdio_uart and removes
the same from mpconfigport.h.
Signed-off-by: David Lechner <david@pybricks.com>
| -rw-r--r-- | ports/teensy/mpconfigport.h | 3 | ||||
| -rw-r--r-- | ports/teensy/teensy_hal.c | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/ports/teensy/mpconfigport.h b/ports/teensy/mpconfigport.h index e57fae15e..f67eb66fa 100644 --- a/ports/teensy/mpconfigport.h +++ b/ports/teensy/mpconfigport.h @@ -41,9 +41,6 @@ extern const struct _mp_obj_module_t pyb_module; #define MP_STATE_PORT MP_STATE_VM -#define MICROPY_PORT_ROOT_POINTERS \ - struct _pyb_uart_obj_t *pyb_stdio_uart; \ - // type definitions for the specific machine #define UINT_FMT "%u" diff --git a/ports/teensy/teensy_hal.c b/ports/teensy/teensy_hal.c index 342e7c650..93103319b 100644 --- a/ports/teensy/teensy_hal.c +++ b/ports/teensy/teensy_hal.c @@ -77,3 +77,5 @@ 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_raise_NotImplementedError(NULL); } + +MP_REGISTER_ROOT_POINTER(struct _pyb_uart_obj_t *pyb_stdio_uart); |
