diff --git a/embassy-net-wiznet/src/lib.rs b/embassy-net-wiznet/src/lib.rs index 545b2a2e4..90102196a 100644 --- a/embassy-net-wiznet/src/lib.rs +++ b/embassy-net-wiznet/src/lib.rs @@ -29,7 +29,7 @@ pub type Device<'d> = embassy_net_driver_channel::Device<'d, MTU>; /// send packet queue. With a the ethernet MTU of _1514_ this takes up `N_RX + /// NTX * 1514` bytes. While setting these both to 1 is the minimum this might /// hurt performance as a packet can not be received while processing another. -/// +/// /// # Warning /// On devices with a small amount of ram (think ~64k) watch out with the size /// of there parameters. They will quickly use too much RAM. diff --git a/examples/stm32f4/src/bin/eth_w5500.rs b/examples/stm32f4/src/bin/eth_w5500.rs index 827e74c51..c51111110 100644 --- a/examples/stm32f4/src/bin/eth_w5500.rs +++ b/examples/stm32f4/src/bin/eth_w5500.rs @@ -5,17 +5,18 @@ use defmt::*; use embassy_executor::Spawner; use embassy_net::tcp::TcpSocket; use embassy_net::{Ipv4Address, Stack, StackResources}; -use embassy_net_wiznet::{chip::W5500, Device, Runner, State}; -use embassy_stm32::gpio::{Level, Output, Pull, Speed}; +use embassy_net_wiznet::chip::W5500; +use embassy_net_wiznet::{Device, Runner, State}; use embassy_stm32::exti::ExtiInput; +use embassy_stm32::gpio::{Level, Output, Pull, Speed}; +use embassy_stm32::mode::Async; use embassy_stm32::rng::Rng; use embassy_stm32::spi::Spi; -use embassy_stm32::mode::Async; use embassy_stm32::time::Hertz; use embassy_stm32::{bind_interrupts, peripherals, rng, spi, Config}; -use embassy_time::{Timer, Delay}; -use embedded_io_async::Write; +use embassy_time::{Delay, Timer}; use embedded_hal_bus::spi::ExclusiveDevice; +use embedded_io_async::Write; use static_cell::StaticCell; use {defmt_rtt as _, panic_probe as _}; @@ -25,9 +26,7 @@ bind_interrupts!(struct Irqs { type EthernetSPI = ExclusiveDevice, Output<'static>, Delay>; #[embassy_executor::task] -async fn ethernet_task( - runner: Runner<'static, W5500, EthernetSPI, ExtiInput<'static>, Output<'static>>, -) -> ! { +async fn ethernet_task(runner: Runner<'static, W5500, EthernetSPI, ExtiInput<'static>, Output<'static>>) -> ! { runner.run().await }