summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriabdalkader <i.abdalkader@gmail.com>2022-03-10 00:54:44 +0200
committerDamien George <damien@micropython.org>2022-03-24 17:23:28 +1100
commitfe8b47e29fb40566fa35e97e02ab06cfab19bf6e (patch)
tree757ade5d3d34e90ac030b0c532b34cfdd8314e85
parent66fe3d5cb5b42a48c0b72480bc1fc54994a91af1 (diff)
ports: Allow boards to define additional network interfaces.
-rw-r--r--ports/mimxrt/mpconfigport.h5
-rw-r--r--ports/rp2/mpconfigport.h5
-rw-r--r--ports/stm32/mpconfigport.h5
3 files changed, 15 insertions, 0 deletions
diff --git a/ports/mimxrt/mpconfigport.h b/ports/mimxrt/mpconfigport.h
index ca8be01f7..b4df533f4 100644
--- a/ports/mimxrt/mpconfigport.h
+++ b/ports/mimxrt/mpconfigport.h
@@ -267,8 +267,13 @@ extern const struct _mp_obj_type_t network_lan_type;
SOCKET_BUILTIN_MODULE \
NETWORK_BUILTIN_MODULE \
+#ifndef MICROPY_BOARD_NETWORK_INTERFACES
+#define MICROPY_BOARD_NETWORK_INTERFACES
+#endif
+
#define MICROPY_PORT_NETWORK_INTERFACES \
MICROPY_HW_NIC_ETH \
+ MICROPY_BOARD_NETWORK_INTERFACES \
#define MICROPY_HW_PIT_NUM_CHANNELS 3
diff --git a/ports/rp2/mpconfigport.h b/ports/rp2/mpconfigport.h
index 1fb0211e8..2919ed018 100644
--- a/ports/rp2/mpconfigport.h
+++ b/ports/rp2/mpconfigport.h
@@ -192,8 +192,13 @@ extern const struct _mod_network_nic_type_t mod_network_nic_type_nina;
SOCKET_BUILTIN_MODULE \
NETWORK_BUILTIN_MODULE \
+#ifndef MICROPY_BOARD_NETWORK_INTERFACES
+#define MICROPY_BOARD_NETWORK_INTERFACES
+#endif
+
#define MICROPY_PORT_NETWORK_INTERFACES \
MICROPY_HW_NIC_NINAW10 \
+ MICROPY_BOARD_NETWORK_INTERFACES \
#ifndef MICROPY_BOARD_ROOT_POINTERS
#define MICROPY_BOARD_ROOT_POINTERS
diff --git a/ports/stm32/mpconfigport.h b/ports/stm32/mpconfigport.h
index 60f6d45fc..18a2edc42 100644
--- a/ports/stm32/mpconfigport.h
+++ b/ports/stm32/mpconfigport.h
@@ -280,11 +280,16 @@ extern const struct _mod_network_nic_type_t mod_network_nic_type_cc3k;
PYB_BUILTIN_MODULE \
STM_BUILTIN_MODULE \
+#ifndef MICROPY_BOARD_NETWORK_INTERFACES
+#define MICROPY_BOARD_NETWORK_INTERFACES
+#endif
+
#define MICROPY_PORT_NETWORK_INTERFACES \
MICROPY_HW_NIC_ETH \
MICROPY_HW_NIC_CYW43 \
MICROPY_HW_NIC_WIZNET5K \
MICROPY_HW_NIC_CC3K \
+ MICROPY_BOARD_NETWORK_INTERFACES \
#define MP_STATE_PORT MP_STATE_VM