extmod/modnetwork: Consolidate definition of common drivers.

Most extmod network drivers were being defined on a per-port basis,
duplicating code and making enabling a driver on a new port harder.

This consolidates extmod driver declarations and removes the existing
per-port definitions of them.

This commit has been verified to be a no-op in terms of firmware change.

Signed-off-by: Andrew Leech <andrew.leech@planetinnovation.com.au>
This commit is contained in:
Andrew Leech
2025-06-04 12:13:46 +10:00
committed by Damien George
parent 95203ab88b
commit fffaf8a41f
9 changed files with 48 additions and 75 deletions

View File

@@ -210,19 +210,11 @@
#define MP_STATE_PORT MP_STATE_VM
#if MICROPY_PY_NETWORK_ESP_HOSTED
extern const struct _mp_obj_type_t mod_network_esp_hosted_type;
#define MICROPY_HW_NIC_ESP_HOSTED { MP_ROM_QSTR(MP_QSTR_WLAN), MP_ROM_PTR(&mod_network_esp_hosted_type) },
#else
#define MICROPY_HW_NIC_ESP_HOSTED
#endif
#ifndef MICROPY_BOARD_NETWORK_INTERFACES
#define MICROPY_BOARD_NETWORK_INTERFACES
#endif
#define MICROPY_PORT_NETWORK_INTERFACES \
MICROPY_HW_NIC_ESP_HOSTED \
MICROPY_BOARD_NETWORK_INTERFACES \
// Miscellaneous settings