diff options
| author | datdenkikniet <[email protected]> | 2025-11-12 22:02:09 +0100 |
|---|---|---|
| committer | datdenkikniet <[email protected]> | 2025-11-13 23:10:02 +0100 |
| commit | 44881e643702b9ca41fc72109c3d16afd4b0449b (patch) | |
| tree | c799cfb83e4d7e5de54ab221659981b88cbcddb9 /tests/stm32/src/bin | |
| parent | a021b4940c852f01322a20a7358bc1a549b3d3c4 (diff) | |
ETH no longer knows about Station management
Diffstat (limited to 'tests/stm32/src/bin')
| -rw-r--r-- | tests/stm32/src/bin/eth.rs | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/tests/stm32/src/bin/eth.rs b/tests/stm32/src/bin/eth.rs index a65682a02..95789ffc5 100644 --- a/tests/stm32/src/bin/eth.rs +++ b/tests/stm32/src/bin/eth.rs | |||
| @@ -7,8 +7,8 @@ mod common; | |||
| 7 | use common::*; | 7 | use common::*; |
| 8 | use embassy_executor::Spawner; | 8 | use embassy_executor::Spawner; |
| 9 | use embassy_net::StackResources; | 9 | use embassy_net::StackResources; |
| 10 | use embassy_stm32::eth::{Ethernet, GenericPhy, PacketQueue}; | 10 | use embassy_stm32::eth::{Ethernet, GenericPhy, PacketQueue, Sma}; |
| 11 | use embassy_stm32::peripherals::ETH; | 11 | use embassy_stm32::peripherals::{ETH, ETH_SMA}; |
| 12 | use embassy_stm32::rng::Rng; | 12 | use embassy_stm32::rng::Rng; |
| 13 | use embassy_stm32::{bind_interrupts, eth, peripherals, rng}; | 13 | use embassy_stm32::{bind_interrupts, eth, peripherals, rng}; |
| 14 | use static_cell::StaticCell; | 14 | use static_cell::StaticCell; |
| @@ -27,7 +27,7 @@ bind_interrupts!(struct Irqs { | |||
| 27 | RNG => rng::InterruptHandler<peripherals::RNG>; | 27 | RNG => rng::InterruptHandler<peripherals::RNG>; |
| 28 | }); | 28 | }); |
| 29 | 29 | ||
| 30 | type Device = Ethernet<'static, ETH, GenericPhy>; | 30 | type Device = Ethernet<'static, ETH, GenericPhy<Sma<'static, ETH_SMA>>>; |
| 31 | 31 | ||
| 32 | #[embassy_executor::task] | 32 | #[embassy_executor::task] |
| 33 | async fn net_task(mut runner: embassy_net::Runner<'static, Device>) -> ! { | 33 | async fn net_task(mut runner: embassy_net::Runner<'static, Device>) -> ! { |
| @@ -69,13 +69,15 @@ async fn main(spawner: Spawner) { | |||
| 69 | const PACKET_QUEUE_SIZE: usize = 4; | 69 | const PACKET_QUEUE_SIZE: usize = 4; |
| 70 | 70 | ||
| 71 | static PACKETS: StaticCell<PacketQueue<PACKET_QUEUE_SIZE, PACKET_QUEUE_SIZE>> = StaticCell::new(); | 71 | static PACKETS: StaticCell<PacketQueue<PACKET_QUEUE_SIZE, PACKET_QUEUE_SIZE>> = StaticCell::new(); |
| 72 | |||
| 73 | let sma = Sma::new(p.ETH_SMA, p.PA2, p.PC1); | ||
| 74 | let phy = GenericPhy::new_auto(sma); | ||
| 75 | |||
| 72 | let device = Ethernet::new( | 76 | let device = Ethernet::new( |
| 73 | PACKETS.init(PacketQueue::<PACKET_QUEUE_SIZE, PACKET_QUEUE_SIZE>::new()), | 77 | PACKETS.init(PacketQueue::<PACKET_QUEUE_SIZE, PACKET_QUEUE_SIZE>::new()), |
| 74 | p.ETH, | 78 | p.ETH, |
| 75 | Irqs, | 79 | Irqs, |
| 76 | p.PA1, | 80 | p.PA1, |
| 77 | p.PA2, | ||
| 78 | p.PC1, | ||
| 79 | p.PA7, | 81 | p.PA7, |
| 80 | p.PC4, | 82 | p.PC4, |
| 81 | p.PC5, | 83 | p.PC5, |
| @@ -85,7 +87,7 @@ async fn main(spawner: Spawner) { | |||
| 85 | #[cfg(feature = "stm32h563zi")] | 87 | #[cfg(feature = "stm32h563zi")] |
| 86 | p.PB15, | 88 | p.PB15, |
| 87 | p.PG11, | 89 | p.PG11, |
| 88 | GenericPhy::new_auto(), | 90 | phy, |
| 89 | mac_addr, | 91 | mac_addr, |
| 90 | ); | 92 | ); |
| 91 | 93 | ||
