From 0b3bc35b7dc0f3d2ffa1673ab790df8e6650fe0f Mon Sep 17 00:00:00 2001 From: datdenkikniet Date: Thu, 13 Nov 2025 23:00:58 +0100 Subject: Add new{_with_phy}, new_mii{_with_phy} --- examples/stm32h7rs/src/bin/eth.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'examples/stm32h7rs') diff --git a/examples/stm32h7rs/src/bin/eth.rs b/examples/stm32h7rs/src/bin/eth.rs index 5ce1d4765..8e07d0a67 100644 --- a/examples/stm32h7rs/src/bin/eth.rs +++ b/examples/stm32h7rs/src/bin/eth.rs @@ -5,8 +5,8 @@ use defmt::*; use embassy_executor::Spawner; use embassy_net::udp::{PacketMetadata, UdpSocket}; use embassy_net::{Ipv4Address, Ipv4Cidr, StackResources}; -use embassy_stm32::eth::{Ethernet, GenericPhy, PacketQueue}; -use embassy_stm32::peripherals::ETH; +use embassy_stm32::eth::{Ethernet, GenericPhy, PacketQueue, Sma}; +use embassy_stm32::peripherals::{ETH, ETH_SMA}; use embassy_stm32::rng::Rng; use embassy_stm32::{Config, bind_interrupts, eth, peripherals, rng}; use embassy_time::Timer; @@ -19,7 +19,7 @@ bind_interrupts!(struct Irqs { RNG => rng::InterruptHandler; }); -type Device = Ethernet<'static, ETH, GenericPhy>; +type Device = Ethernet<'static, ETH, GenericPhy>>; #[embassy_executor::task] async fn net_task(mut runner: embassy_net::Runner<'static, Device>) -> ! { @@ -69,16 +69,16 @@ async fn main(spawner: Spawner) -> ! { p.ETH, Irqs, p.PB6, - p.PA2, - p.PG6, p.PA7, p.PG4, p.PG5, p.PG13, p.PG12, p.PG11, - GenericPhy::new(0), mac_addr, + p.ETH_SMA, + p.PA2, + p.PG6, ); // Have to use UDP w/ static config to fit in internal flash -- cgit