Skip to content

Commit

Permalink
extmod/network_ninaw10: Move ninaw10 root pointer registrations here.
Browse files Browse the repository at this point in the history
Originally in drivers/ninaw10/nina_wifi_bsp.c but that isn't a QSTR source.

Also remove outdated commment about root pointers in mpconfigport.h.

Signed-off-by: Jim Mussared <[email protected]>
  • Loading branch information
jimmo authored and dpgeorge committed Jul 21, 2022
1 parent 8b4298a commit a053827
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
4 changes: 0 additions & 4 deletions drivers/ninaw10/nina_wifi_bsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,4 @@ int nina_bsp_spi_transfer(const uint8_t *tx_buf, uint8_t *rx_buf, uint32_t size)
return 0;
}

MP_REGISTER_ROOT_POINTER(struct _machine_spi_obj_t *mp_wifi_spi);
MP_REGISTER_ROOT_POINTER(struct _machine_timer_obj_t *mp_wifi_timer);
MP_REGISTER_ROOT_POINTER(struct _mp_obj_list_t *mp_wifi_sockpoll_list);

#endif // MICROPY_PY_NETWORK_NINAW10
4 changes: 4 additions & 0 deletions extmod/network_ninaw10.c
Original file line number Diff line number Diff line change
Expand Up @@ -797,4 +797,8 @@ const mod_network_nic_type_t mod_network_nic_type_nina = {
.ioctl = network_ninaw10_socket_ioctl,
};

MP_REGISTER_ROOT_POINTER(struct _machine_spi_obj_t *mp_wifi_spi);
MP_REGISTER_ROOT_POINTER(struct _machine_timer_obj_t *mp_wifi_timer);
MP_REGISTER_ROOT_POINTER(struct _mp_obj_list_t *mp_wifi_sockpoll_list);

#endif // #if MICROPY_PY_BLUETOOTH && MICROPY_PY_NETWORK_NINAW10
1 change: 0 additions & 1 deletion ports/rp2/mpconfigport.h
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ extern const struct _mp_obj_type_t mp_network_cyw43_type;
#ifndef MICROPY_PY_USOCKET_EXTENDED_STATE
#define MICROPY_PY_USOCKET_EXTENDED_STATE (1)
#endif
// It also requires an additional root pointer for the SPI object.
extern const struct _mod_network_nic_type_t mod_network_nic_type_nina;
#define MICROPY_HW_NIC_NINAW10 { MP_ROM_QSTR(MP_QSTR_WLAN), MP_ROM_PTR(&mod_network_nic_type_nina) },
#else
Expand Down

0 comments on commit a053827

Please sign in to comment.