mirror of
https://github.com/micropython/micropython.git
synced 2026-01-07 20:50:14 +01:00
esp8266: Use MP_REGISTER_ROOT_POINTER().
This uses MP_REGISTER_ROOT_POINTER() to register all port-specific root pointers in the esp2866 port. Signed-off-by: David Lechner <david@pybricks.com>
This commit is contained in:
committed by
Damien George
parent
b63282c361
commit
e2d4db96da
@@ -515,3 +515,5 @@ STATIC const mp_obj_type_t pin_irq_type = {
|
|||||||
.call = pin_irq_call,
|
.call = pin_irq_call,
|
||||||
.locals_dict = (mp_obj_dict_t *)&pin_irq_locals_dict,
|
.locals_dict = (mp_obj_dict_t *)&pin_irq_locals_dict,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
MP_REGISTER_ROOT_POINTER(mp_obj_t pin_irq_handler[16]);
|
||||||
|
|||||||
@@ -329,3 +329,5 @@ const mp_obj_type_t pyb_uart_type = {
|
|||||||
.protocol = &uart_stream_p,
|
.protocol = &uart_stream_p,
|
||||||
.locals_dict = (mp_obj_dict_t *)&pyb_uart_locals_dict,
|
.locals_dict = (mp_obj_dict_t *)&pyb_uart_locals_dict,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
MP_REGISTER_ROOT_POINTER(byte * uart0_rxbuf);
|
||||||
|
|||||||
@@ -147,10 +147,6 @@ extern const struct _mp_print_t mp_debug_print;
|
|||||||
|
|
||||||
#define MP_STATE_PORT MP_STATE_VM
|
#define MP_STATE_PORT MP_STATE_VM
|
||||||
|
|
||||||
#define MICROPY_PORT_ROOT_POINTERS \
|
|
||||||
mp_obj_t pin_irq_handler[16]; \
|
|
||||||
byte *uart0_rxbuf; \
|
|
||||||
|
|
||||||
// We need an implementation of the log2 function which is not a macro
|
// We need an implementation of the log2 function which is not a macro
|
||||||
#define MP_NEED_LOG2 (1)
|
#define MP_NEED_LOG2 (1)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user