Add basic WiFi support for CYW43 driver#777
Merged
mattnite merged 6 commits intoZigEmbeddedGroup:mainfrom Dec 24, 2025
Merged
Conversation
Collaborator
|
Could you add an example to the repo? |
Contributor
|
Very nice! I was actually waiting for Zig 0.16 and the new IO stuff to add this, but you were faster ; ) I will definitely take a look but probably during weekend. If this works, it will be a great base for the I/O rewrite when we switch to Zig 0.16. Btw @tom-dudley I am also C# programmer ; ) |
Contributor
Author
|
Thanks folks! I've added examples for WiFi scanning, joining and turning the LED on and off :) |
mattnite
requested changes
Dec 23, 2025
Contributor
mattnite
left a comment
There was a problem hiding this comment.
Great patch! just have some naming nits
Contributor
Author
|
@mattnite I'm not sure why CI didn't get kicked off with the latest commits (ignoring merge commits perhaps?) If you retrigger it should be back to everything passing. |
added 6 commits
December 23, 2025 23:12
e42f043 to
b49c7be
Compare
mattnite
approved these changes
Dec 24, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is my attempt at getting WiFi working for the CYW43 (e.g. Raspberry Pi Pico 2 W), building on #489. It adds AP scanning and AP connection (the unhappy path may not be as thoroughly tested..I was mainly concerned with getting a network stack working in principle.)
Some notes:
embassy-rsand the upstream Infineonwifi-host-driverrunneras it is but the semantics might want to be changed. The Rust code uses async for handling but we're not using async so..unsure if it makes sense to have the runner.runner.run()return aboolindicating if a frame is ready. to be read;runner.get_rx_frame()is used to read it. Maybe that's redundant and we should just use thenullfromget_rx_frame.wifi.gpio_set(0, true)can set that pin. I'm unsure if this is the best place to make this work (it does work for enabling/disabling the LED).side_setin the pio/spi code should be using theclk_pin- so there's a bug fix for that too.blinkyexample for this board as it requires slightly different setup. The README should explain all this. For reference: https://github.com/raspberrypi/pico-examples/blob/master/pico_w/wifi/blink/picow_blink.c .wifi_scan.zigandwifi_connect.zigexamples. Note I've only tested these (and the blinky example) on the Pico 2 W, not the Pico W. I assume it 'just works' as it's the same wireless chip.