@@ -200,6 +200,20 @@ struct _mp_bluetooth_nimble_malloc_t;
200
200
#define MICROPY_PORT_ROOT_POINTER_BLUETOOTH_NIMBLE
201
201
#endif
202
202
203
+ #if MICROPY_PY_NETWORK_NINAW10
204
+ // This Network interface requires the extended socket state.
205
+ #ifndef MICROPY_PY_USOCKET_EXTENDED_STATE
206
+ #define MICROPY_PY_USOCKET_EXTENDED_STATE (1)
207
+ #endif
208
+ // It also requires and additional root pointer for the SPI object.
209
+ #define MICROPY_PORT_ROOT_POINTER_NINAW10 struct _machine_spi_obj_t *mp_wifi_spi;
210
+ extern const struct _mod_network_nic_type_t mod_network_nic_type_nina ;
211
+ #define MICROPY_HW_NIC_NINAW10 { MP_ROM_QSTR(MP_QSTR_WLAN), MP_ROM_PTR(&mod_network_nic_type_nina) },
212
+ #else
213
+ #define MICROPY_HW_NIC_NINAW10
214
+ #define MICROPY_PORT_ROOT_POINTER_NINAW10
215
+ #endif
216
+
203
217
#define MICROPY_PORT_BUILTIN_MODULES \
204
218
{ MP_OBJ_NEW_QSTR(MP_QSTR_machine), (mp_obj_t)&mp_module_machine }, \
205
219
{ MP_OBJ_NEW_QSTR(MP_QSTR__onewire), (mp_obj_t)&mp_module_onewire }, \
@@ -209,12 +223,13 @@ struct _mp_bluetooth_nimble_malloc_t;
209
223
SOCKET_BUILTIN_MODULE \
210
224
NETWORK_BUILTIN_MODULE \
211
225
226
+ #define MICROPY_PORT_NETWORK_INTERFACES \
227
+ MICROPY_HW_NIC_NINAW10 \
228
+
212
229
#ifndef MICROPY_BOARD_ROOT_POINTERS
213
230
#define MICROPY_BOARD_ROOT_POINTERS
214
231
#endif
215
232
216
- #define MICROPY_PORT_NETWORK_INTERFACES \
217
-
218
233
#define MICROPY_PORT_ROOT_POINTERS \
219
234
const char *readline_hist[8]; \
220
235
void *machine_pin_irq_obj[30]; \
@@ -224,6 +239,7 @@ struct _mp_bluetooth_nimble_malloc_t;
224
239
void *rp2_uart_tx_buffer[2]; \
225
240
NETWORK_ROOT_POINTERS \
226
241
MICROPY_BOARD_ROOT_POINTERS \
242
+ MICROPY_PORT_ROOT_POINTER_NINAW10 \
227
243
MICROPY_PORT_ROOT_POINTER_BLUETOOTH \
228
244
MICROPY_PORT_ROOT_POINTER_BLUETOOTH_NIMBLE \
229
245
0 commit comments