diff options
| author | Dario Nieuwenhuis <[email protected]> | 2023-08-15 23:02:53 +0200 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2023-08-15 23:05:55 +0200 |
| commit | 11b66a73b4fc85469eeb8f718531492aed128e26 (patch) | |
| tree | 19eda8e5e80a5d19e966ac108cedaf51795cb348 | |
| parent | 1d4b941d52a7e257b0305935034e999facb537bd (diff) | |
net-wiznet: rename from embassy-net-w5500.
16 files changed, 52 insertions, 30 deletions
diff --git a/.github/ci/doc.sh b/.github/ci/doc.sh index f829582ab..57184dc1d 100755 --- a/.github/ci/doc.sh +++ b/.github/ci/doc.sh | |||
| @@ -35,7 +35,7 @@ docserver-builder -i ./embassy-usb-driver -o webroot/crates/embassy-usb-driver/g | |||
| 35 | docserver-builder -i ./embassy-usb-logger -o webroot/crates/embassy-usb-logger/git.zup | 35 | docserver-builder -i ./embassy-usb-logger -o webroot/crates/embassy-usb-logger/git.zup |
| 36 | docserver-builder -i ./cyw43 -o webroot/crates/cyw43/git.zup | 36 | docserver-builder -i ./cyw43 -o webroot/crates/cyw43/git.zup |
| 37 | docserver-builder -i ./cyw43-pio -o webroot/crates/cyw43-pio/git.zup | 37 | docserver-builder -i ./cyw43-pio -o webroot/crates/cyw43-pio/git.zup |
| 38 | docserver-builder -i ./embassy-net-w5500 -o webroot/crates/embassy-net-w5500/git.zup | 38 | docserver-builder -i ./embassy-net-wiznet -o webroot/crates/embassy-net-wiznet/git.zup |
| 39 | docserver-builder -i ./embassy-net-enc28j60 -o webroot/crates/embassy-net-enc28j60/git.zup | 39 | docserver-builder -i ./embassy-net-enc28j60 -o webroot/crates/embassy-net-enc28j60/git.zup |
| 40 | docserver-builder -i ./embassy-net-esp-hosted -o webroot/crates/embassy-net-esp-hosted/git.zup | 40 | docserver-builder -i ./embassy-net-esp-hosted -o webroot/crates/embassy-net-esp-hosted/git.zup |
| 41 | docserver-builder -i ./embassy-stm32-wpan -o webroot/crates/embassy-stm32-wpan/git.zup --output-static webroot/static | 41 | docserver-builder -i ./embassy-stm32-wpan -o webroot/crates/embassy-stm32-wpan/git.zup --output-static webroot/static |
diff --git a/embassy-net-driver-channel/README.md b/embassy-net-driver-channel/README.md index dd90e7ad2..8f904ce95 100644 --- a/embassy-net-driver-channel/README.md +++ b/embassy-net-driver-channel/README.md | |||
| @@ -76,7 +76,7 @@ These `embassy-net` drivers are implemented using this crate. You can look at th | |||
| 76 | 76 | ||
| 77 | - [`cyw43`](https://github.com/embassy-rs/embassy/tree/main/cyw43) for WiFi on CYW43xx chips, used in the Raspberry Pi Pico W | 77 | - [`cyw43`](https://github.com/embassy-rs/embassy/tree/main/cyw43) for WiFi on CYW43xx chips, used in the Raspberry Pi Pico W |
| 78 | - [`embassy-usb`](https://github.com/embassy-rs/embassy/tree/main/embassy-usb) for Ethernet-over-USB (CDC NCM) support. | 78 | - [`embassy-usb`](https://github.com/embassy-rs/embassy/tree/main/embassy-usb) for Ethernet-over-USB (CDC NCM) support. |
| 79 | - [`embassy-net-w5500`](https://github.com/embassy-rs/embassy/tree/main/embassy-net-w5500) for Wiznet W5500 SPI Ethernet MAC+PHY chip. | 79 | - [`embassy-net-wiznet`](https://github.com/embassy-rs/embassy/tree/main/embassy-net-wiznet) for Wiznet SPI Ethernet MAC+PHY chips. |
| 80 | - [`embassy-net-esp-hosted`](https://github.com/embassy-rs/embassy/tree/main/embassy-net-esp-hosted) for using ESP32 chips with the [`esp-hosted`](https://github.com/espressif/esp-hosted) firmware as WiFi adapters for another non-ESP32 MCU. | 80 | - [`embassy-net-esp-hosted`](https://github.com/embassy-rs/embassy/tree/main/embassy-net-esp-hosted) for using ESP32 chips with the [`esp-hosted`](https://github.com/espressif/esp-hosted) firmware as WiFi adapters for another non-ESP32 MCU. |
| 81 | 81 | ||
| 82 | 82 | ||
diff --git a/embassy-net-w5500/README.md b/embassy-net-w5500/README.md deleted file mode 100644 index 9eaf4b700..000000000 --- a/embassy-net-w5500/README.md +++ /dev/null | |||
| @@ -1,7 +0,0 @@ | |||
| 1 | # WIZnet W5500 `embassy-net` integration | ||
| 2 | |||
| 3 | [`embassy-net`](https://crates.io/crates/embassy-net) integration for the WIZnet W5500 SPI ethernet chip, operating in MACRAW mode. | ||
| 4 | |||
| 5 | Supports any SPI driver implementing [`embedded-hal-async`](https://crates.io/crates/embedded-hal-async) | ||
| 6 | |||
| 7 | See [`examples`](https://github.com/kalkyl/embassy-net-w5500/tree/main/examples) directory for usage examples with the rp2040 [`WIZnet W5500-EVB-Pico`](https://www.wiznet.io/product-item/w5500-evb-pico/) module. \ No newline at end of file | ||
diff --git a/embassy-net-w5500/Cargo.toml b/embassy-net-wiznet/Cargo.toml index c45598684..dff03ac83 100644 --- a/embassy-net-w5500/Cargo.toml +++ b/embassy-net-wiznet/Cargo.toml | |||
| @@ -1,8 +1,8 @@ | |||
| 1 | [package] | 1 | [package] |
| 2 | name = "embassy-net-w5500" | 2 | name = "embassy-net-wiznet" |
| 3 | version = "0.1.0" | 3 | version = "0.1.0" |
| 4 | description = "embassy-net driver for the W5500 ethernet chip" | 4 | description = "embassy-net driver for WIZnet SPI Ethernet chips" |
| 5 | keywords = ["embedded", "w5500", "embassy-net", "embedded-hal-async", "ethernet", "async"] | 5 | keywords = ["embedded", "wiznet", "embassy-net", "embedded-hal-async", "ethernet", "async"] |
| 6 | categories = ["embedded", "hardware-support", "no-std", "network-programming", "async"] | 6 | categories = ["embedded", "hardware-support", "no-std", "network-programming", "async"] |
| 7 | license = "MIT OR Apache-2.0" | 7 | license = "MIT OR Apache-2.0" |
| 8 | edition = "2021" | 8 | edition = "2021" |
| @@ -16,7 +16,7 @@ embassy-futures = { version = "0.1.0", path = "../embassy-futures" } | |||
| 16 | defmt = { version = "0.3", optional = true } | 16 | defmt = { version = "0.3", optional = true } |
| 17 | 17 | ||
| 18 | [package.metadata.embassy_docs] | 18 | [package.metadata.embassy_docs] |
| 19 | src_base = "https://github.com/embassy-rs/embassy/blob/embassy-net-w5500-v$VERSION/embassy-net-w5500/src/" | 19 | src_base = "https://github.com/embassy-rs/embassy/blob/embassy-net-wiznet-v$VERSION/embassy-net-wiznet/src/" |
| 20 | src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-net-w5500/src/" | 20 | src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/embassy-net-wiznet/src/" |
| 21 | target = "thumbv7em-none-eabi" | 21 | target = "thumbv7em-none-eabi" |
| 22 | features = ["defmt"] \ No newline at end of file | 22 | features = ["defmt"] \ No newline at end of file |
diff --git a/embassy-net-wiznet/README.md b/embassy-net-wiznet/README.md new file mode 100644 index 000000000..b8e4bdc8e --- /dev/null +++ b/embassy-net-wiznet/README.md | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | # WIZnet `embassy-net` integration | ||
| 2 | |||
| 3 | [`embassy-net`](https://crates.io/crates/embassy-net) integration for the WIZnet SPI ethernet chips, operating in MACRAW mode. | ||
| 4 | |||
| 5 | See [`examples`](https://github.com/embassy-rs/embassy/tree/main/examples/rp) directory for usage examples with the rp2040 [`WIZnet W5500-EVB-Pico`](https://www.wiznet.io/product-item/w5500-evb-pico/) module. | ||
| 6 | |||
| 7 | ## Supported chips | ||
| 8 | |||
| 9 | - W5500 | ||
| 10 | - W5100S | ||
| 11 | |||
| 12 | ## Interoperability | ||
| 13 | |||
| 14 | This crate can run on any executor. | ||
| 15 | |||
| 16 | It supports any SPI driver implementing [`embedded-hal-async`](https://crates.io/crates/embedded-hal-async). | ||
| 17 | |||
| 18 | |||
| 19 | ## License | ||
| 20 | |||
| 21 | This work is licensed under either of | ||
| 22 | |||
| 23 | - Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or | ||
| 24 | http://www.apache.org/licenses/LICENSE-2.0) | ||
| 25 | - MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT) | ||
| 26 | |||
| 27 | at your option. | ||
diff --git a/embassy-net-w5500/src/chip/mod.rs b/embassy-net-wiznet/src/chip/mod.rs index 562db515a..562db515a 100644 --- a/embassy-net-w5500/src/chip/mod.rs +++ b/embassy-net-wiznet/src/chip/mod.rs | |||
diff --git a/embassy-net-w5500/src/chip/w5100s.rs b/embassy-net-wiznet/src/chip/w5100s.rs index 07a840370..07a840370 100644 --- a/embassy-net-w5500/src/chip/w5100s.rs +++ b/embassy-net-wiznet/src/chip/w5100s.rs | |||
diff --git a/embassy-net-w5500/src/chip/w5500.rs b/embassy-net-wiznet/src/chip/w5500.rs index 61e512946..61e512946 100644 --- a/embassy-net-w5500/src/chip/w5500.rs +++ b/embassy-net-wiznet/src/chip/w5500.rs | |||
diff --git a/embassy-net-w5500/src/device.rs b/embassy-net-wiznet/src/device.rs index f367bc3eb..43f9512a3 100644 --- a/embassy-net-w5500/src/device.rs +++ b/embassy-net-wiznet/src/device.rs | |||
| @@ -16,7 +16,7 @@ enum Interrupt { | |||
| 16 | Receive = 0b00100_u8, | 16 | Receive = 0b00100_u8, |
| 17 | } | 17 | } |
| 18 | 18 | ||
| 19 | /// W5500 in MACRAW mode | 19 | /// Wiznet chip in MACRAW mode |
| 20 | #[derive(Debug)] | 20 | #[derive(Debug)] |
| 21 | #[cfg_attr(feature = "defmt", derive(defmt::Format))] | 21 | #[cfg_attr(feature = "defmt", derive(defmt::Format))] |
| 22 | pub(crate) struct WiznetDevice<C, SPI> { | 22 | pub(crate) struct WiznetDevice<C, SPI> { |
| @@ -25,7 +25,7 @@ pub(crate) struct WiznetDevice<C, SPI> { | |||
| 25 | } | 25 | } |
| 26 | 26 | ||
| 27 | impl<C: Chip, SPI: SpiDevice> WiznetDevice<C, SPI> { | 27 | impl<C: Chip, SPI: SpiDevice> WiznetDevice<C, SPI> { |
| 28 | /// Create and initialize the W5500 driver | 28 | /// Create and initialize the driver |
| 29 | pub async fn new(spi: SPI, mac_addr: [u8; 6]) -> Result<Self, SPI::Error> { | 29 | pub async fn new(spi: SPI, mac_addr: [u8; 6]) -> Result<Self, SPI::Error> { |
| 30 | let mut this = Self { | 30 | let mut this = Self { |
| 31 | spi, | 31 | spi, |
diff --git a/embassy-net-w5500/src/lib.rs b/embassy-net-wiznet/src/lib.rs index 3030dfb90..3030dfb90 100644 --- a/embassy-net-w5500/src/lib.rs +++ b/embassy-net-wiznet/src/lib.rs | |||
diff --git a/embassy-net/README.md b/embassy-net/README.md index 811321ca4..7bb2283c4 100644 --- a/embassy-net/README.md +++ b/embassy-net/README.md | |||
| @@ -22,7 +22,7 @@ unimplemented features of the network protocols. | |||
| 22 | - [`cyw43`](https://github.com/embassy-rs/embassy/tree/main/cyw43) for WiFi on CYW43xx chips, used in the Raspberry Pi Pico W | 22 | - [`cyw43`](https://github.com/embassy-rs/embassy/tree/main/cyw43) for WiFi on CYW43xx chips, used in the Raspberry Pi Pico W |
| 23 | - [`embassy-usb`](https://github.com/embassy-rs/embassy/tree/main/embassy-usb) for Ethernet-over-USB (CDC NCM) support. | 23 | - [`embassy-usb`](https://github.com/embassy-rs/embassy/tree/main/embassy-usb) for Ethernet-over-USB (CDC NCM) support. |
| 24 | - [`embassy-stm32`](https://github.com/embassy-rs/embassy/tree/main/embassy-stm32) for the builtin Ethernet MAC in all STM32 chips (STM32F1, STM32F2, STM32F4, STM32F7, STM32H7, STM32H5). | 24 | - [`embassy-stm32`](https://github.com/embassy-rs/embassy/tree/main/embassy-stm32) for the builtin Ethernet MAC in all STM32 chips (STM32F1, STM32F2, STM32F4, STM32F7, STM32H7, STM32H5). |
| 25 | - [`embassy-net-w5500`](https://github.com/embassy-rs/embassy/tree/main/embassy-net-w5500) for Wiznet W5500 SPI Ethernet MAC+PHY chip. | 25 | - [`embassy-net-wiznet`](https://github.com/embassy-rs/embassy/tree/main/embassy-net-wiznet) for Wiznet SPI Ethernet MAC+PHY chips (W5100S, W5500) |
| 26 | - [`embassy-net-esp-hosted`](https://github.com/embassy-rs/embassy/tree/main/embassy-net-esp-hosted) for using ESP32 chips with the [`esp-hosted`](https://github.com/espressif/esp-hosted) firmware as WiFi adapters for another non-ESP32 MCU. | 26 | - [`embassy-net-esp-hosted`](https://github.com/embassy-rs/embassy/tree/main/embassy-net-esp-hosted) for using ESP32 chips with the [`esp-hosted`](https://github.com/espressif/esp-hosted) firmware as WiFi adapters for another non-ESP32 MCU. |
| 27 | 27 | ||
| 28 | ## Examples | 28 | ## Examples |
diff --git a/examples/rp/Cargo.toml b/examples/rp/Cargo.toml index d83e370df..6742ce7ef 100644 --- a/examples/rp/Cargo.toml +++ b/examples/rp/Cargo.toml | |||
| @@ -13,7 +13,7 @@ embassy-time = { version = "0.1.2", path = "../../embassy-time", features = ["ni | |||
| 13 | embassy-rp = { version = "0.1.0", path = "../../embassy-rp", features = ["defmt", "unstable-traits", "nightly", "unstable-pac", "time-driver", "critical-section-impl"] } | 13 | embassy-rp = { version = "0.1.0", path = "../../embassy-rp", features = ["defmt", "unstable-traits", "nightly", "unstable-pac", "time-driver", "critical-section-impl"] } |
| 14 | embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] } | 14 | embassy-usb = { version = "0.1.0", path = "../../embassy-usb", features = ["defmt"] } |
| 15 | embassy-net = { version = "0.1.0", path = "../../embassy-net", features = ["defmt", "nightly", "tcp", "udp", "dhcpv4", "medium-ethernet"] } | 15 | embassy-net = { version = "0.1.0", path = "../../embassy-net", features = ["defmt", "nightly", "tcp", "udp", "dhcpv4", "medium-ethernet"] } |
| 16 | embassy-net-w5500 = { version = "0.1.0", path = "../../embassy-net-w5500", features = ["defmt"] } | 16 | embassy-net-wiznet = { version = "0.1.0", path = "../../embassy-net-wiznet", features = ["defmt"] } |
| 17 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } | 17 | embassy-futures = { version = "0.1.0", path = "../../embassy-futures" } |
| 18 | embassy-usb-logger = { version = "0.1.0", path = "../../embassy-usb-logger" } | 18 | embassy-usb-logger = { version = "0.1.0", path = "../../embassy-usb-logger" } |
| 19 | embassy-lora = { version = "0.1.0", path = "../../embassy-lora", features = ["time", "defmt"] } | 19 | embassy-lora = { version = "0.1.0", path = "../../embassy-lora", features = ["time", "defmt"] } |
diff --git a/examples/rp/src/bin/ethernet_w5500_multisocket.rs b/examples/rp/src/bin/ethernet_w5500_multisocket.rs index 3677f3cd6..d4af87642 100644 --- a/examples/rp/src/bin/ethernet_w5500_multisocket.rs +++ b/examples/rp/src/bin/ethernet_w5500_multisocket.rs | |||
| @@ -10,8 +10,8 @@ use defmt::*; | |||
| 10 | use embassy_executor::Spawner; | 10 | use embassy_executor::Spawner; |
| 11 | use embassy_futures::yield_now; | 11 | use embassy_futures::yield_now; |
| 12 | use embassy_net::{Stack, StackResources}; | 12 | use embassy_net::{Stack, StackResources}; |
| 13 | use embassy_net_w5500::chip::W5500; | 13 | use embassy_net_wiznet::chip::W5500; |
| 14 | use embassy_net_w5500::*; | 14 | use embassy_net_wiznet::*; |
| 15 | use embassy_rp::clocks::RoscRng; | 15 | use embassy_rp::clocks::RoscRng; |
| 16 | use embassy_rp::gpio::{Input, Level, Output, Pull}; | 16 | use embassy_rp::gpio::{Input, Level, Output, Pull}; |
| 17 | use embassy_rp::peripherals::{PIN_17, PIN_20, PIN_21, SPI0}; | 17 | use embassy_rp::peripherals::{PIN_17, PIN_20, PIN_21, SPI0}; |
| @@ -56,7 +56,7 @@ async fn main(spawner: Spawner) { | |||
| 56 | 56 | ||
| 57 | let mac_addr = [0x02, 0x00, 0x00, 0x00, 0x00, 0x00]; | 57 | let mac_addr = [0x02, 0x00, 0x00, 0x00, 0x00, 0x00]; |
| 58 | let state = make_static!(State::<8, 8>::new()); | 58 | let state = make_static!(State::<8, 8>::new()); |
| 59 | let (device, runner) = embassy_net_w5500::new( | 59 | let (device, runner) = embassy_net_wiznet::new( |
| 60 | mac_addr, | 60 | mac_addr, |
| 61 | state, | 61 | state, |
| 62 | ExclusiveDevice::new(spi, cs, Delay), | 62 | ExclusiveDevice::new(spi, cs, Delay), |
diff --git a/examples/rp/src/bin/ethernet_w5500_tcp_client.rs b/examples/rp/src/bin/ethernet_w5500_tcp_client.rs index b78a09779..78340492e 100644 --- a/examples/rp/src/bin/ethernet_w5500_tcp_client.rs +++ b/examples/rp/src/bin/ethernet_w5500_tcp_client.rs | |||
| @@ -12,8 +12,8 @@ use defmt::*; | |||
| 12 | use embassy_executor::Spawner; | 12 | use embassy_executor::Spawner; |
| 13 | use embassy_futures::yield_now; | 13 | use embassy_futures::yield_now; |
| 14 | use embassy_net::{Stack, StackResources}; | 14 | use embassy_net::{Stack, StackResources}; |
| 15 | use embassy_net_w5500::chip::W5500; | 15 | use embassy_net_wiznet::chip::W5500; |
| 16 | use embassy_net_w5500::*; | 16 | use embassy_net_wiznet::*; |
| 17 | use embassy_rp::clocks::RoscRng; | 17 | use embassy_rp::clocks::RoscRng; |
| 18 | use embassy_rp::gpio::{Input, Level, Output, Pull}; | 18 | use embassy_rp::gpio::{Input, Level, Output, Pull}; |
| 19 | use embassy_rp::peripherals::{PIN_17, PIN_20, PIN_21, SPI0}; | 19 | use embassy_rp::peripherals::{PIN_17, PIN_20, PIN_21, SPI0}; |
| @@ -59,7 +59,7 @@ async fn main(spawner: Spawner) { | |||
| 59 | 59 | ||
| 60 | let mac_addr = [0x02, 0x00, 0x00, 0x00, 0x00, 0x00]; | 60 | let mac_addr = [0x02, 0x00, 0x00, 0x00, 0x00, 0x00]; |
| 61 | let state = make_static!(State::<8, 8>::new()); | 61 | let state = make_static!(State::<8, 8>::new()); |
| 62 | let (device, runner) = embassy_net_w5500::new( | 62 | let (device, runner) = embassy_net_wiznet::new( |
| 63 | mac_addr, | 63 | mac_addr, |
| 64 | state, | 64 | state, |
| 65 | ExclusiveDevice::new(spi, cs, Delay), | 65 | ExclusiveDevice::new(spi, cs, Delay), |
diff --git a/examples/rp/src/bin/ethernet_w5500_tcp_server.rs b/examples/rp/src/bin/ethernet_w5500_tcp_server.rs index 34f054d9a..e6d132740 100644 --- a/examples/rp/src/bin/ethernet_w5500_tcp_server.rs +++ b/examples/rp/src/bin/ethernet_w5500_tcp_server.rs | |||
| @@ -11,8 +11,8 @@ use defmt::*; | |||
| 11 | use embassy_executor::Spawner; | 11 | use embassy_executor::Spawner; |
| 12 | use embassy_futures::yield_now; | 12 | use embassy_futures::yield_now; |
| 13 | use embassy_net::{Stack, StackResources}; | 13 | use embassy_net::{Stack, StackResources}; |
| 14 | use embassy_net_w5500::chip::W5500; | 14 | use embassy_net_wiznet::chip::W5500; |
| 15 | use embassy_net_w5500::*; | 15 | use embassy_net_wiznet::*; |
| 16 | use embassy_rp::clocks::RoscRng; | 16 | use embassy_rp::clocks::RoscRng; |
| 17 | use embassy_rp::gpio::{Input, Level, Output, Pull}; | 17 | use embassy_rp::gpio::{Input, Level, Output, Pull}; |
| 18 | use embassy_rp::peripherals::{PIN_17, PIN_20, PIN_21, SPI0}; | 18 | use embassy_rp::peripherals::{PIN_17, PIN_20, PIN_21, SPI0}; |
| @@ -23,6 +23,7 @@ use embedded_io_async::Write; | |||
| 23 | use rand::RngCore; | 23 | use rand::RngCore; |
| 24 | use static_cell::make_static; | 24 | use static_cell::make_static; |
| 25 | use {defmt_rtt as _, panic_probe as _}; | 25 | use {defmt_rtt as _, panic_probe as _}; |
| 26 | |||
| 26 | #[embassy_executor::task] | 27 | #[embassy_executor::task] |
| 27 | async fn ethernet_task( | 28 | async fn ethernet_task( |
| 28 | runner: Runner< | 29 | runner: Runner< |
| @@ -57,7 +58,7 @@ async fn main(spawner: Spawner) { | |||
| 57 | 58 | ||
| 58 | let mac_addr = [0x02, 0x00, 0x00, 0x00, 0x00, 0x00]; | 59 | let mac_addr = [0x02, 0x00, 0x00, 0x00, 0x00, 0x00]; |
| 59 | let state = make_static!(State::<8, 8>::new()); | 60 | let state = make_static!(State::<8, 8>::new()); |
| 60 | let (device, runner) = embassy_net_w5500::new( | 61 | let (device, runner) = embassy_net_wiznet::new( |
| 61 | mac_addr, | 62 | mac_addr, |
| 62 | state, | 63 | state, |
| 63 | ExclusiveDevice::new(spi, cs, Delay), | 64 | ExclusiveDevice::new(spi, cs, Delay), |
diff --git a/examples/rp/src/bin/ethernet_w5500_udp.rs b/examples/rp/src/bin/ethernet_w5500_udp.rs index 8f38e453e..b546714df 100644 --- a/examples/rp/src/bin/ethernet_w5500_udp.rs +++ b/examples/rp/src/bin/ethernet_w5500_udp.rs | |||
| @@ -11,8 +11,8 @@ use embassy_executor::Spawner; | |||
| 11 | use embassy_futures::yield_now; | 11 | use embassy_futures::yield_now; |
| 12 | use embassy_net::udp::{PacketMetadata, UdpSocket}; | 12 | use embassy_net::udp::{PacketMetadata, UdpSocket}; |
| 13 | use embassy_net::{Stack, StackResources}; | 13 | use embassy_net::{Stack, StackResources}; |
| 14 | use embassy_net_w5500::chip::W5500; | 14 | use embassy_net_wiznet::chip::W5500; |
| 15 | use embassy_net_w5500::*; | 15 | use embassy_net_wiznet::*; |
| 16 | use embassy_rp::clocks::RoscRng; | 16 | use embassy_rp::clocks::RoscRng; |
| 17 | use embassy_rp::gpio::{Input, Level, Output, Pull}; | 17 | use embassy_rp::gpio::{Input, Level, Output, Pull}; |
| 18 | use embassy_rp::peripherals::{PIN_17, PIN_20, PIN_21, SPI0}; | 18 | use embassy_rp::peripherals::{PIN_17, PIN_20, PIN_21, SPI0}; |
| @@ -22,6 +22,7 @@ use embedded_hal_async::spi::ExclusiveDevice; | |||
| 22 | use rand::RngCore; | 22 | use rand::RngCore; |
| 23 | use static_cell::make_static; | 23 | use static_cell::make_static; |
| 24 | use {defmt_rtt as _, panic_probe as _}; | 24 | use {defmt_rtt as _, panic_probe as _}; |
| 25 | |||
| 25 | #[embassy_executor::task] | 26 | #[embassy_executor::task] |
| 26 | async fn ethernet_task( | 27 | async fn ethernet_task( |
| 27 | runner: Runner< | 28 | runner: Runner< |
| @@ -55,7 +56,7 @@ async fn main(spawner: Spawner) { | |||
| 55 | 56 | ||
| 56 | let mac_addr = [0x02, 0x00, 0x00, 0x00, 0x00, 0x00]; | 57 | let mac_addr = [0x02, 0x00, 0x00, 0x00, 0x00, 0x00]; |
| 57 | let state = make_static!(State::<8, 8>::new()); | 58 | let state = make_static!(State::<8, 8>::new()); |
| 58 | let (device, runner) = embassy_net_w5500::new( | 59 | let (device, runner) = embassy_net_wiznet::new( |
| 59 | mac_addr, | 60 | mac_addr, |
| 60 | state, | 61 | state, |
| 61 | ExclusiveDevice::new(spi, cs, Delay), | 62 | ExclusiveDevice::new(spi, cs, Delay), |
