@@ -154,6 +154,20 @@ struct _mp_bluetooth_nimble_malloc_t;
154
154
#define MICROPY_PORT_ROOT_POINTER_BLUETOOTH_NIMBLE
155
155
#endif
156
156
157
+ #if MICROPY_PY_NETWORK_NINAW10
158
+ // This Network interface requires the extended socket state.
159
+ #ifndef MICROPY_PY_USOCKET_EXTENDED_STATE
160
+ #define MICROPY_PY_USOCKET_EXTENDED_STATE (1)
161
+ #endif
162
+ // It also requires an additional root pointer for the SPI object.
163
+ #define MICROPY_PORT_ROOT_POINTER_NINAW10 struct _machine_spi_obj_t *mp_wifi_spi;
164
+ extern const struct _mod_network_nic_type_t mod_network_nic_type_nina ;
165
+ #define MICROPY_HW_NIC_NINAW10 { MP_ROM_QSTR(MP_QSTR_WLAN), MP_ROM_PTR(&mod_network_nic_type_nina) },
166
+ #else
167
+ #define MICROPY_HW_NIC_NINAW10
168
+ #define MICROPY_PORT_ROOT_POINTER_NINAW10
169
+ #endif
170
+
157
171
#define MICROPY_PORT_BUILTIN_MODULES \
158
172
{ MP_OBJ_NEW_QSTR(MP_QSTR_machine), (mp_obj_t)&mp_module_machine }, \
159
173
{ MP_OBJ_NEW_QSTR(MP_QSTR__onewire), (mp_obj_t)&mp_module_onewire }, \
@@ -163,12 +177,13 @@ struct _mp_bluetooth_nimble_malloc_t;
163
177
SOCKET_BUILTIN_MODULE \
164
178
NETWORK_BUILTIN_MODULE \
165
179
180
+ #define MICROPY_PORT_NETWORK_INTERFACES \
181
+ MICROPY_HW_NIC_NINAW10 \
182
+
166
183
#ifndef MICROPY_BOARD_ROOT_POINTERS
167
184
#define MICROPY_BOARD_ROOT_POINTERS
168
185
#endif
169
186
170
- #define MICROPY_PORT_NETWORK_INTERFACES \
171
-
172
187
#define MICROPY_PORT_ROOT_POINTERS \
173
188
const char *readline_hist[8]; \
174
189
void *machine_pin_irq_obj[30]; \
@@ -178,6 +193,7 @@ struct _mp_bluetooth_nimble_malloc_t;
178
193
void *rp2_uart_tx_buffer[2]; \
179
194
NETWORK_ROOT_POINTERS \
180
195
MICROPY_BOARD_ROOT_POINTERS \
196
+ MICROPY_PORT_ROOT_POINTER_NINAW10 \
181
197
MICROPY_PORT_ROOT_POINTER_BLUETOOTH \
182
198
MICROPY_PORT_ROOT_POINTER_BLUETOOTH_NIMBLE \
183
199
0 commit comments