zephyr: Use MP_REGISTER_ROOT_POINTER().

This uses MP_REGISTER_ROOT_POINTER() to register port-specific root
pointers for the zephyr port.

Signed-off-by: David Lechner <david@pybricks.com>
pull/8922/head
David Lechner 2022-07-01 15:51:12 -05:00 zatwierdzone przez Damien George
rodzic 186be074a7
commit ccda7686a4
3 zmienionych plików z 5 dodań i 4 usunięć

Wyświetl plik

@ -322,4 +322,7 @@ STATIC const mp_irq_methods_t machine_pin_irq_methods = {
.info = machine_pin_irq_info,
};
/* Linked list of pin irq objects */
MP_REGISTER_ROOT_POINTER(void *machine_pin_irq_list);
#endif // MICROPY_PY_MACHINE

Wyświetl plik

@ -418,4 +418,6 @@ int mp_bluetooth_gap_peripheral_connect_cancel(void) {
#endif // MICROPY_PY_BLUETOOTH_ENABLE_CENTRAL_MODE
MP_REGISTER_ROOT_POINTER(struct _mp_bluetooth_zephyr_root_pointers_t *bluetooth_zephyr_root_pointers);
#endif // MICROPY_PY_BLUETOOTH

Wyświetl plik

@ -133,10 +133,6 @@ typedef long mp_off_t;
#define MP_STATE_PORT MP_STATE_VM
#define MICROPY_PORT_ROOT_POINTERS \
void *machine_pin_irq_list; /* Linked list of pin irq objects */ \
struct _mp_bluetooth_zephyr_root_pointers_t *bluetooth_zephyr_root_pointers;
// extra built in names to add to the global namespace
#define MICROPY_PORT_BUILTINS \
{ MP_ROM_QSTR(MP_QSTR_open), MP_ROM_PTR(&mp_builtin_open_obj) },