aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordvdsk <[email protected]>2024-06-08 00:30:52 +0200
committerdvdsk <[email protected]>2024-06-08 00:30:52 +0200
commitab31a02e17b812a965842c1b14dc44b96a57932a (patch)
tree764a15d77311c8faba2fab1e42cb79afdb6e0e72
parent1812ccd276a6c277e7c99191c0aa5ce3d1c90e84 (diff)
cargo fmt
-rw-r--r--embassy-net-wiznet/src/lib.rs2
-rw-r--r--examples/stm32f4/src/bin/eth_w5500.rs15
2 files changed, 8 insertions, 9 deletions
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>;
29/// send packet queue. With a the ethernet MTU of _1514_ this takes up `N_RX + 29/// send packet queue. With a the ethernet MTU of _1514_ this takes up `N_RX +
30/// NTX * 1514` bytes. While setting these both to 1 is the minimum this might 30/// NTX * 1514` bytes. While setting these both to 1 is the minimum this might
31/// hurt performance as a packet can not be received while processing another. 31/// hurt performance as a packet can not be received while processing another.
32/// 32///
33/// # Warning 33/// # Warning
34/// On devices with a small amount of ram (think ~64k) watch out with the size 34/// On devices with a small amount of ram (think ~64k) watch out with the size
35/// of there parameters. They will quickly use too much RAM. 35/// 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::*;
5use embassy_executor::Spawner; 5use embassy_executor::Spawner;
6use embassy_net::tcp::TcpSocket; 6use embassy_net::tcp::TcpSocket;
7use embassy_net::{Ipv4Address, Stack, StackResources}; 7use embassy_net::{Ipv4Address, Stack, StackResources};
8use embassy_net_wiznet::{chip::W5500, Device, Runner, State}; 8use embassy_net_wiznet::chip::W5500;
9use embassy_stm32::gpio::{Level, Output, Pull, Speed}; 9use embassy_net_wiznet::{Device, Runner, State};
10use embassy_stm32::exti::ExtiInput; 10use embassy_stm32::exti::ExtiInput;
11use embassy_stm32::gpio::{Level, Output, Pull, Speed};
12use embassy_stm32::mode::Async;
11use embassy_stm32::rng::Rng; 13use embassy_stm32::rng::Rng;
12use embassy_stm32::spi::Spi; 14use embassy_stm32::spi::Spi;
13use embassy_stm32::mode::Async;
14use embassy_stm32::time::Hertz; 15use embassy_stm32::time::Hertz;
15use embassy_stm32::{bind_interrupts, peripherals, rng, spi, Config}; 16use embassy_stm32::{bind_interrupts, peripherals, rng, spi, Config};
16use embassy_time::{Timer, Delay}; 17use embassy_time::{Delay, Timer};
17use embedded_io_async::Write;
18use embedded_hal_bus::spi::ExclusiveDevice; 18use embedded_hal_bus::spi::ExclusiveDevice;
19use embedded_io_async::Write;
19use static_cell::StaticCell; 20use static_cell::StaticCell;
20use {defmt_rtt as _, panic_probe as _}; 21use {defmt_rtt as _, panic_probe as _};
21 22
@@ -25,9 +26,7 @@ bind_interrupts!(struct Irqs {
25 26
26type EthernetSPI = ExclusiveDevice<Spi<'static, Async>, Output<'static>, Delay>; 27type EthernetSPI = ExclusiveDevice<Spi<'static, Async>, Output<'static>, Delay>;
27#[embassy_executor::task] 28#[embassy_executor::task]
28async fn ethernet_task( 29async fn ethernet_task(runner: Runner<'static, W5500, EthernetSPI, ExtiInput<'static>, Output<'static>>) -> ! {
29 runner: Runner<'static, W5500, EthernetSPI, ExtiInput<'static>, Output<'static>>,
30) -> ! {
31 runner.run().await 30 runner.run().await
32} 31}
33 32