aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2022-06-07 14:41:25 +1000
committerDamien George <damien@micropython.org>2022-06-07 16:55:18 +1000
commit9670a156dabc1c751a6b02ef280daccf5a0ed213 (patch)
tree64831354b2dd826b45fc4dc9eafd30d82324f6bf
parent66dfe17b181101bbee9ff22ebd30b7f05787b439 (diff)
all: Rename MICROPY_PY_WIZNET5K to MICROPY_PY_NETWORK_WIZNET5K.
To match MICROPY_PY_NETWORK_CYW43 and MICROPY_PY_NETWORK_NINAW10. Signed-off-by: Damien George <damien@micropython.org>
-rw-r--r--docs/library/network.WIZNET5K.rst2
-rw-r--r--extmod/network_wiznet5k.c4
-rw-r--r--ports/rp2/CMakeLists.txt6
-rw-r--r--ports/rp2/boards/W5100S_EVB_PICO/mpconfigboard.cmake2
-rw-r--r--ports/rp2/mpconfigport.h2
-rw-r--r--ports/rp2/mpnetworkport.c10
-rw-r--r--ports/stm32/Makefile6
-rw-r--r--ports/stm32/modnwwiznet5k.c8
-rw-r--r--ports/stm32/mpconfigport.h2
-rw-r--r--ports/stm32/mpconfigport.mk2
-rw-r--r--ports/stm32/mpnetworkport.c4
-rw-r--r--ports/stm32/network_wiznet5k.c8
-rwxr-xr-xtools/autobuild/build-stm32-extra.sh8
-rwxr-xr-xtools/ci.sh2
14 files changed, 33 insertions, 33 deletions
diff --git a/docs/library/network.WIZNET5K.rst b/docs/library/network.WIZNET5K.rst
index 9e2c40f7f..c13d43a37 100644
--- a/docs/library/network.WIZNET5K.rst
+++ b/docs/library/network.WIZNET5K.rst
@@ -6,7 +6,7 @@ class WIZNET5K -- control WIZnet5x00 Ethernet modules
This class allows you to control WIZnet5x00 Ethernet adaptors based on
the W5200 and W5500 chipsets. The particular chipset that is supported
-by the firmware is selected at compile-time via the MICROPY_PY_WIZNET5K
+by the firmware is selected at compile-time via the MICROPY_PY_NETWORK_WIZNET5K
option.
Example usage::
diff --git a/extmod/network_wiznet5k.c b/extmod/network_wiznet5k.c
index e14d8bdd6..f328276a5 100644
--- a/extmod/network_wiznet5k.c
+++ b/extmod/network_wiznet5k.c
@@ -40,7 +40,7 @@
#include "modmachine.h"
#include "drivers/bus/spi.h"
-#if MICROPY_PY_WIZNET5K
+#if MICROPY_PY_NETWORK_WIZNET5K
#include "lib/wiznet5k/Ethernet/wizchip_conf.h"
@@ -1039,4 +1039,4 @@ const mod_network_nic_type_t mod_network_nic_type_wiznet5k = {
};
#endif
-#endif // MICROPY_PY_WIZNET5K
+#endif // MICROPY_PY_NETWORK_WIZNET5K
diff --git a/ports/rp2/CMakeLists.txt b/ports/rp2/CMakeLists.txt
index 7749d95ca..d5793fc62 100644
--- a/ports/rp2/CMakeLists.txt
+++ b/ports/rp2/CMakeLists.txt
@@ -234,11 +234,11 @@ if (MICROPY_PY_NETWORK_NINAW10)
)
endif()
-if (MICROPY_PY_WIZNET5K)
+if (MICROPY_PY_NETWORK_WIZNET5K)
target_compile_definitions(${MICROPY_TARGET} PRIVATE
- MICROPY_PY_WIZNET5K=1
+ MICROPY_PY_NETWORK_WIZNET5K=1
WIZCHIP_PREFIXED_EXPORTS=1
- _WIZCHIP_=${MICROPY_PY_WIZNET5K}
+ _WIZCHIP_=${MICROPY_PY_NETWORK_WIZNET5K}
WIZCHIP_YIELD=mpy_wiznet_yield
)
diff --git a/ports/rp2/boards/W5100S_EVB_PICO/mpconfigboard.cmake b/ports/rp2/boards/W5100S_EVB_PICO/mpconfigboard.cmake
index fc5db6e4a..bc5d1ea65 100644
--- a/ports/rp2/boards/W5100S_EVB_PICO/mpconfigboard.cmake
+++ b/ports/rp2/boards/W5100S_EVB_PICO/mpconfigboard.cmake
@@ -1,4 +1,4 @@
# cmake file for Wiznet W5100S-EVB-Pico.
set(PICO_BOARD pico)
-set(MICROPY_PY_WIZNET5K W5100S)
+set(MICROPY_PY_NETWORK_WIZNET5K W5100S)
set(MICROPY_PY_LWIP 1)
diff --git a/ports/rp2/mpconfigport.h b/ports/rp2/mpconfigport.h
index e2d0ffd22..d681a04af 100644
--- a/ports/rp2/mpconfigport.h
+++ b/ports/rp2/mpconfigport.h
@@ -164,7 +164,7 @@ extern const struct _mod_network_nic_type_t mod_network_nic_type_nina;
#define MICROPY_PORT_ROOT_POINTER_NINAW10
#endif
-#if MICROPY_PY_WIZNET5K
+#if MICROPY_PY_NETWORK_WIZNET5K
#if MICROPY_PY_LWIP
extern const struct _mp_obj_type_t mod_network_nic_type_wiznet5k;
#else
diff --git a/ports/rp2/mpnetworkport.c b/ports/rp2/mpnetworkport.c
index b481abba2..124907f53 100644
--- a/ports/rp2/mpnetworkport.c
+++ b/ports/rp2/mpnetworkport.c
@@ -39,7 +39,7 @@ static alarm_id_t lwip_alarm_id = -1;
static bool lwip_can_poll = true;
static bool lwip_poll_pending = false;
-#if MICROPY_PY_WIZNET5K
+#if MICROPY_PY_NETWORK_WIZNET5K
static bool wiznet_poll_pending = false;
void wiznet5k_poll(void);
@@ -64,7 +64,7 @@ void lwip_lock_acquire(void) {
void lwip_lock_release(void) {
lwip_can_poll = false;
- #if MICROPY_PY_WIZNET5K
+ #if MICROPY_PY_NETWORK_WIZNET5K
if (wiznet_poll_pending) {
wiznet5k_poll();
wiznet_poll_pending = false;
@@ -90,7 +90,7 @@ uint32_t lwip_try_poll(void) {
return ret;
}
-#if MICROPY_PY_WIZNET5K
+#if MICROPY_PY_NETWORK_WIZNET5K
void wiznet5k_try_poll(void) {
if (lwip_can_poll) {
lwip_can_poll = false;
@@ -103,14 +103,14 @@ void wiznet5k_try_poll(void) {
#endif
STATIC int64_t alarm_callback(alarm_id_t id, void *user_data) {
- #if MICROPY_PY_WIZNET5K
+ #if MICROPY_PY_NETWORK_WIZNET5K
wiznet5k_try_poll();
#endif
return (int64_t)lwip_try_poll() * 1000;
}
void mod_network_lwip_init(void) {
- #if MICROPY_PY_WIZNET5K
+ #if MICROPY_PY_NETWORK_WIZNET5K
wiznet5k_deinit();
#endif
if (lwip_alarm_id != -1) {
diff --git a/ports/stm32/Makefile b/ports/stm32/Makefile
index 10e4e15d9..1a4616f02 100644
--- a/ports/stm32/Makefile
+++ b/ports/stm32/Makefile
@@ -449,17 +449,17 @@ DRIVERS_SRC_C += drivers/cyw43/cyw43_ctrl.c drivers/cyw43/cyw43_lwip.c
LIBS += $(TOP)/drivers/cyw43/libcyw43.a
endif
-ifneq ($(MICROPY_PY_WIZNET5K),0)
+ifneq ($(MICROPY_PY_NETWORK_WIZNET5K),0)
WIZNET5K_DIR=drivers/wiznet5k
INC += -I$(TOP)/$(WIZNET5K_DIR)
-CFLAGS_MOD += -DMICROPY_PY_WIZNET5K=$(MICROPY_PY_WIZNET5K) -D_WIZCHIP_=$(MICROPY_PY_WIZNET5K)
+CFLAGS_MOD += -DMICROPY_PY_WIZNET5K=$(MICROPY_PY_NETWORK_WIZNET5K) -D_WIZCHIP_=$(MICROPY_PY_NETWORK_WIZNET5K)
ifeq ($(MICROPY_PY_LWIP),1)
# When using MACRAW mode (with lwIP), maximum buffer space must be used for the raw socket
CFLAGS_MOD += -DWIZCHIP_USE_MAX_BUFFER
endif
SRC_MOD += network_wiznet5k.c modnwwiznet5k.c
SRC_MOD += $(addprefix $(WIZNET5K_DIR)/,\
- ethernet/w$(MICROPY_PY_WIZNET5K)/w$(MICROPY_PY_WIZNET5K).c \
+ ethernet/w$(MICROPY_PY_NETWORK_WIZNET5K)/w$(MICROPY_PY_NETWORK_WIZNET5K).c \
ethernet/wizchip_conf.c \
ethernet/socket.c \
internet/dns/dns.c \
diff --git a/ports/stm32/modnwwiznet5k.c b/ports/stm32/modnwwiznet5k.c
index f7adad3f3..2d5044d52 100644
--- a/ports/stm32/modnwwiznet5k.c
+++ b/ports/stm32/modnwwiznet5k.c
@@ -38,7 +38,7 @@
#include "pin.h"
#include "spi.h"
-#if MICROPY_PY_WIZNET5K && !MICROPY_PY_LWIP
+#if MICROPY_PY_NETWORK_WIZNET5K && !MICROPY_PY_LWIP
#include "ethernet/wizchip_conf.h"
#include "ethernet/socket.h"
@@ -419,7 +419,7 @@ STATIC mp_obj_t wiznet5k_regs(mp_obj_t self_in) {
if (i % 16 == 0) {
printf("\n %04x:", i);
}
- #if MICROPY_PY_WIZNET5K == 5200
+ #if MICROPY_PY_NETWORK_WIZNET5K == 5200
uint32_t reg = i;
#else
uint32_t reg = _W5500_IO_BASE_ | i << 8;
@@ -432,7 +432,7 @@ STATIC mp_obj_t wiznet5k_regs(mp_obj_t self_in) {
if (i % 16 == 0) {
printf("\n %04x:", i);
}
- #if MICROPY_PY_WIZNET5K == 5200
+ #if MICROPY_PY_NETWORK_WIZNET5K == 5200
uint32_t reg = WIZCHIP_SREG_ADDR(sn, i);
#else
uint32_t reg = _W5500_IO_BASE_ | i << 8 | WIZCHIP_SREG_BLOCK(sn) << 3;
@@ -510,4 +510,4 @@ const mod_network_nic_type_t mod_network_nic_type_wiznet5k = {
.ioctl = wiznet5k_socket_ioctl,
};
-#endif // MICROPY_PY_WIZNET5K && !MICROPY_PY_LWIP
+#endif // MICROPY_PY_NETWORK_WIZNET5K && !MICROPY_PY_LWIP
diff --git a/ports/stm32/mpconfigport.h b/ports/stm32/mpconfigport.h
index eb2344d07..a87fe3768 100644
--- a/ports/stm32/mpconfigport.h
+++ b/ports/stm32/mpconfigport.h
@@ -201,7 +201,7 @@ extern const struct _mp_obj_type_t mp_network_cyw43_type;
#define MICROPY_HW_NIC_CYW43
#endif
-#if MICROPY_PY_WIZNET5K
+#if MICROPY_PY_NETWORK_WIZNET5K
#if MICROPY_PY_LWIP
extern const struct _mp_obj_type_t mod_network_nic_type_wiznet5k;
#else
diff --git a/ports/stm32/mpconfigport.mk b/ports/stm32/mpconfigport.mk
index 98ae93d20..830ccf031 100644
--- a/ports/stm32/mpconfigport.mk
+++ b/ports/stm32/mpconfigport.mk
@@ -4,7 +4,7 @@
# 0 : no Wiznet support
# 5200 : support for W5200 module
# 5500 : support for W5500 module
-MICROPY_PY_WIZNET5K ?= 0
+MICROPY_PY_NETWORK_WIZNET5K ?= 0
# cc3k module for wifi support
MICROPY_PY_CC3K ?= 0
diff --git a/ports/stm32/mpnetworkport.c b/ports/stm32/mpnetworkport.c
index c879c5005..2f49328e1 100644
--- a/ports/stm32/mpnetworkport.c
+++ b/ports/stm32/mpnetworkport.c
@@ -48,7 +48,7 @@
// Poll lwIP every 128ms
#define LWIP_TICK(tick) (((tick) & ~(SYSTICK_DISPATCH_NUM_SLOTS - 1) & 0x7f) == 0)
-#if MICROPY_PY_WIZNET5K
+#if MICROPY_PY_NETWORK_WIZNET5K
void wiznet5k_poll(void);
#endif
@@ -57,7 +57,7 @@ u32_t sys_now(void) {
}
STATIC void pyb_lwip_poll(void) {
- #if MICROPY_PY_WIZNET5K
+ #if MICROPY_PY_NETWORK_WIZNET5K
// Poll the NIC for incoming data
wiznet5k_poll();
#endif
diff --git a/ports/stm32/network_wiznet5k.c b/ports/stm32/network_wiznet5k.c
index a52919155..4675f3c2c 100644
--- a/ports/stm32/network_wiznet5k.c
+++ b/ports/stm32/network_wiznet5k.c
@@ -32,7 +32,7 @@
#include "extmod/modnetwork.h"
#include "spi.h"
-#if MICROPY_PY_WIZNET5K && MICROPY_PY_LWIP
+#if MICROPY_PY_NETWORK_WIZNET5K && MICROPY_PY_LWIP
#include "shared/netutils/netutils.h"
#include "drivers/wiznet5k/ethernet/socket.h"
@@ -295,7 +295,7 @@ STATIC mp_obj_t wiznet5k_regs(mp_obj_t self_in) {
if (i % 16 == 0) {
printf("\n %04x:", i);
}
- #if MICROPY_PY_WIZNET5K == 5200
+ #if MICROPY_PY_NETWORK_WIZNET5K == 5200
uint32_t reg = i;
#else
uint32_t reg = _W5500_IO_BASE_ | i << 8;
@@ -308,7 +308,7 @@ STATIC mp_obj_t wiznet5k_regs(mp_obj_t self_in) {
if (i % 16 == 0) {
printf("\n %04x:", i);
}
- #if MICROPY_PY_WIZNET5K == 5200
+ #if MICROPY_PY_NETWORK_WIZNET5K == 5200
uint32_t reg = WIZCHIP_SREG_ADDR(sn, i);
#else
uint32_t reg = _W5500_IO_BASE_ | i << 8 | WIZCHIP_SREG_BLOCK(sn) << 3;
@@ -462,4 +462,4 @@ const mp_obj_type_t mod_network_nic_type_wiznet5k = {
.locals_dict = (mp_obj_dict_t *)&wiznet5k_locals_dict,
};
-#endif // MICROPY_PY_WIZNET5K && MICROPY_PY_LWIP
+#endif // MICROPY_PY_NETWORK_WIZNET5K && MICROPY_PY_LWIP
diff --git a/tools/autobuild/build-stm32-extra.sh b/tools/autobuild/build-stm32-extra.sh
index 43842d6c9..80c6f42f5 100755
--- a/tools/autobuild/build-stm32-extra.sh
+++ b/tools/autobuild/build-stm32-extra.sh
@@ -32,16 +32,16 @@ fi
# build the versions
do_build pybv3 PYBV3
-do_build pybv3-network PYBV3 MICROPY_PY_WIZNET5K=5200 MICROPY_PY_CC3K=1
+do_build pybv3-network PYBV3 MICROPY_PY_NETWORK_WIZNET5K=5200 MICROPY_PY_CC3K=1
do_build pybv10-dp PYBV10 MICROPY_FLOAT_IMPL=double
do_build pybv10-thread PYBV10 CFLAGS_EXTRA='-DMICROPY_PY_THREAD=1'
do_build pybv10-dp-thread PYBV10 MICROPY_FLOAT_IMPL=double CFLAGS_EXTRA='-DMICROPY_PY_THREAD=1'
-do_build pybv10-network PYBV10 MICROPY_PY_WIZNET5K=5200 MICROPY_PY_CC3K=1
+do_build pybv10-network PYBV10 MICROPY_PY_NETWORK_WIZNET5K=5200 MICROPY_PY_CC3K=1
do_build pybv11-dp PYBV11 MICROPY_FLOAT_IMPL=double
do_build pybv11-thread PYBV11 CFLAGS_EXTRA='-DMICROPY_PY_THREAD=1'
do_build pybv11-dp-thread PYBV11 MICROPY_FLOAT_IMPL=double CFLAGS_EXTRA='-DMICROPY_PY_THREAD=1'
-do_build pybv11-network PYBV11 MICROPY_PY_WIZNET5K=5200 MICROPY_PY_CC3K=1
+do_build pybv11-network PYBV11 MICROPY_PY_NETWORK_WIZNET5K=5200 MICROPY_PY_CC3K=1
do_build pyblitev10-dp PYBLITEV10 MICROPY_FLOAT_IMPL=double
do_build pyblitev10-thread PYBLITEV10 CFLAGS_EXTRA='-DMICROPY_PY_THREAD=1'
do_build pyblitev10-dp-thread PYBLITEV10 MICROPY_FLOAT_IMPL=double CFLAGS_EXTRA='-DMICROPY_PY_THREAD=1'
-do_build pyblitev10-network PYBLITEV10 MICROPY_PY_WIZNET5K=5200 MICROPY_PY_CC3K=1
+do_build pyblitev10-network PYBLITEV10 MICROPY_PY_NETWORK_WIZNET5K=5200 MICROPY_PY_CC3K=1
diff --git a/tools/ci.sh b/tools/ci.sh
index f8890adce..4670a9211 100755
--- a/tools/ci.sh
+++ b/tools/ci.sh
@@ -305,7 +305,7 @@ function ci_stm32_pyb_build {
make ${MAKEOPTS} -C ports/stm32 submodules
git submodule update --init lib/btstack
git submodule update --init lib/mynewt-nimble
- make ${MAKEOPTS} -C ports/stm32 BOARD=PYBV11 MICROPY_PY_WIZNET5K=5200 MICROPY_PY_CC3K=1 USER_C_MODULES=../../examples/usercmodule
+ make ${MAKEOPTS} -C ports/stm32 BOARD=PYBV11 MICROPY_PY_NETWORK_WIZNET5K=5200 MICROPY_PY_CC3K=1 USER_C_MODULES=../../examples/usercmodule
make ${MAKEOPTS} -C ports/stm32 BOARD=PYBD_SF2
make ${MAKEOPTS} -C ports/stm32 BOARD=PYBD_SF6 NANBOX=1 MICROPY_BLUETOOTH_NIMBLE=0 MICROPY_BLUETOOTH_BTSTACK=1
make ${MAKEOPTS} -C ports/stm32/mboot BOARD=PYBV10 CFLAGS_EXTRA='-DMBOOT_FSLOAD=1 -DMBOOT_VFS_LFS2=1'