Skip to content

Commit

Permalink
stm32: Switch Wiznet to use lib/wiznet5k and extmod/network_wiznet5k.
Browse files Browse the repository at this point in the history
Instead of the old Wiznet driver in drivers/wiznet5k.
  • Loading branch information
robert-hh authored and dpgeorge committed Aug 23, 2022
1 parent b1efc13 commit 7179240
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 985 deletions.
17 changes: 10 additions & 7 deletions ports/stm32/Makefile
Expand Up @@ -460,19 +460,22 @@ LIBS += $(TOP)/drivers/cyw43/libcyw43.a
endif

ifneq ($(MICROPY_PY_NETWORK_WIZNET5K),0)
WIZNET5K_DIR=drivers/wiznet5k
INC += -I$(TOP)/$(WIZNET5K_DIR)
WIZNET5K_DIR=lib/wiznet5k
GIT_SUBMODULES += lib/wiznet5k
INC += -I$(TOP)/$(WIZNET5K_DIR) -I$(TOP)/$(WIZNET5K_DIR)/Ethernet
CFLAGS_MOD += -DMICROPY_PY_NETWORK_WIZNET5K=$(MICROPY_PY_NETWORK_WIZNET5K) -D_WIZCHIP_=$(MICROPY_PY_NETWORK_WIZNET5K)
CFLAGS_MOD += -DWIZCHIP_PREFIXED_EXPORTS=1
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 += extmod/network_wiznet5k.c
SRC_MOD += $(addprefix $(WIZNET5K_DIR)/,\
ethernet/w$(MICROPY_PY_NETWORK_WIZNET5K)/w$(MICROPY_PY_NETWORK_WIZNET5K).c \
ethernet/wizchip_conf.c \
ethernet/socket.c \
internet/dns/dns.c \
Ethernet/W$(MICROPY_PY_NETWORK_WIZNET5K)/w$(MICROPY_PY_NETWORK_WIZNET5K).c \
Ethernet/wizchip_conf.c \
Ethernet/socket.c \
Internet/DNS/dns.c \
Internet/DHCP/dhcp.c \
)
endif

Expand Down

0 comments on commit 7179240

Please sign in to comment.