| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Point the submodule at WIZnet's ioLibrary_Driver instead of a fork that carries MicroPython-specific patches and has drifted from upstream. The driver is rewritten in the same commit, as the old one relies on the fork's WIZCHIP_EXPORT() macro. The fork-only build defines go too; the driver now sets the socket buffer sizes itself. No user-visible change. Signed-off-by: wiznet-grace <Grace@wiznet.io>
The fork called a yield hook from the blocking loops in socket.c. ioLibrary_Driver has none, so a blocked recv() could not be interrupted with Ctrl-C. Open the sockets non-blocking instead and wait in the driver, calling mp_event_handle_nowait() between attempts. Only the WIZnet TCP stack uses this code; lwIP builds are unaffected. Signed-off-by: wiznet-grace <Grace@wiznet.io>
List every chip the driver now supports rather than just W5200 and W5500, and show the no-argument constructor used on boards that have the chip fitted, alongside the existing external-module example. Signed-off-by: wiznet-grace <Grace@wiznet.io>
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## master #19713 +/- ##
=======================================
Coverage 98.55% 98.55%
=======================================
Files 182 182
Lines 23335 23335
Branches 5 5
=======================================
Hits 22998 22998
Misses 336 336
Partials 1 1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness.
|
Sorry, something went wrong.
|
Code size report: Reference: esp32/boards/SEEED_XIAO_ESP32C5: Use 0x2000 as the flash offset. [b0310f5]
Comparison: docs/library/network.WIZNET5K: Update for the new driver. [merge of 35632a7]
mpy-cross: +0 +0.000%
bare-arm: +0 +0.000%
minimal x86: +0 +0.000%
unix x64: +0 +0.000% standard
stm32: +0 +0.000% PYBV10
esp32: +0 +0.000% ESP32_GENERIC
mimxrt: +0 +0.000% TEENSY40
rp2: +0 +0.000% RPI_PICO_W
samd: +0 +0.000% ADAFRUIT_ITSYBITSY_M4_EXPRESS
qemu rv32: +0 +0.000% VIRT_RV32
|
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Summary
Point lib/wiznet5k at WIZnet's ioLibrary_Driver instead of a fork that carries MicroPython-specific patches and has drifted from the library WIZnet maintains and tests, and rewrite extmod/network_wiznet5k.c against it. The library is vendored unchanged. WIZnet unified it last year, so one codebase now covers W5100 through W6300, which is what lets the later PRs add the W6xxx parts without a second driver.
The API is unchanged: same network.WIZNET5K class, same MICROPY_PY_NETWORK_WIZNET5K values, same wiznet5k_poll() / wiznet5k_deinit() entry points. No board files are touched, and the port build files only lose the fork-only defines.
The rewrite also carries a few fixes the driver needed anyway:
The W6100 and W6300 register branches are in the driver already, but nothing selects those chips until the boards PR, so that code is not reachable yet.
First of the PRs splitting up #18035, which stays open for now. Once this is merged:
Testing
Hardware, on W5100S-EVB-Pico and W5500-EVB-Pico, each built both with lwIP and with the WIZnet stack (MICROPY_PY_LWIP=0):
Builds, with no warnings and no warning suppression:
The warnings the library's own headers used to raise were fixed upstream in Wiznet/ioLibrary_Driver#186, which the submodule is pinned to.
Known gaps on the WIZnet stack, the same before and after this change, so not regressions:
All three need the same waiting machinery, so they go with the socket timeout PR at the end of the series.
Trade-offs and Alternatives