diff options
| author | datdenkikniet <[email protected]> | 2025-11-13 23:00:58 +0100 |
|---|---|---|
| committer | Johannes Cornelis Draaijer <[email protected]> | 2025-11-14 14:08:06 +0100 |
| commit | 0b3bc35b7dc0f3d2ffa1673ab790df8e6650fe0f (patch) | |
| tree | 71b02b007385bcca6b96d8eb13169bf27551ebe1 /examples/stm32h7rs | |
| parent | 694249487cd592a0f806aab61b28534e33c1c5f0 (diff) | |
Add new{_with_phy}, new_mii{_with_phy}
Diffstat (limited to 'examples/stm32h7rs')
| -rw-r--r-- | examples/stm32h7rs/src/bin/eth.rs | 12 |
1 files changed, 6 insertions, 6 deletions
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::*; | |||
| 5 | use embassy_executor::Spawner; | 5 | use embassy_executor::Spawner; |
| 6 | use embassy_net::udp::{PacketMetadata, UdpSocket}; | 6 | use embassy_net::udp::{PacketMetadata, UdpSocket}; |
| 7 | use embassy_net::{Ipv4Address, Ipv4Cidr, StackResources}; | 7 | use embassy_net::{Ipv4Address, Ipv4Cidr, StackResources}; |
| 8 | use embassy_stm32::eth::{Ethernet, GenericPhy, PacketQueue}; | 8 | use embassy_stm32::eth::{Ethernet, GenericPhy, PacketQueue, Sma}; |
| 9 | use embassy_stm32::peripherals::ETH; | 9 | use embassy_stm32::peripherals::{ETH, ETH_SMA}; |
| 10 | use embassy_stm32::rng::Rng; | 10 | use embassy_stm32::rng::Rng; |
| 11 | use embassy_stm32::{Config, bind_interrupts, eth, peripherals, rng}; | 11 | use embassy_stm32::{Config, bind_interrupts, eth, peripherals, rng}; |
| 12 | use embassy_time::Timer; | 12 | use embassy_time::Timer; |
| @@ -19,7 +19,7 @@ bind_interrupts!(struct Irqs { | |||
| 19 | RNG => rng::InterruptHandler<peripherals::RNG>; | 19 | RNG => rng::InterruptHandler<peripherals::RNG>; |
| 20 | }); | 20 | }); |
| 21 | 21 | ||
| 22 | type Device = Ethernet<'static, ETH, GenericPhy>; | 22 | type Device = Ethernet<'static, ETH, GenericPhy<Sma<'static, ETH_SMA>>>; |
| 23 | 23 | ||
| 24 | #[embassy_executor::task] | 24 | #[embassy_executor::task] |
| 25 | async fn net_task(mut runner: embassy_net::Runner<'static, Device>) -> ! { | 25 | async fn net_task(mut runner: embassy_net::Runner<'static, Device>) -> ! { |
| @@ -69,16 +69,16 @@ async fn main(spawner: Spawner) -> ! { | |||
| 69 | p.ETH, | 69 | p.ETH, |
| 70 | Irqs, | 70 | Irqs, |
| 71 | p.PB6, | 71 | p.PB6, |
| 72 | p.PA2, | ||
| 73 | p.PG6, | ||
| 74 | p.PA7, | 72 | p.PA7, |
| 75 | p.PG4, | 73 | p.PG4, |
| 76 | p.PG5, | 74 | p.PG5, |
| 77 | p.PG13, | 75 | p.PG13, |
| 78 | p.PG12, | 76 | p.PG12, |
| 79 | p.PG11, | 77 | p.PG11, |
| 80 | GenericPhy::new(0), | ||
| 81 | mac_addr, | 78 | mac_addr, |
| 79 | p.ETH_SMA, | ||
| 80 | p.PA2, | ||
| 81 | p.PG6, | ||
| 82 | ); | 82 | ); |
| 83 | 83 | ||
| 84 | // Have to use UDP w/ static config to fit in internal flash | 84 | // Have to use UDP w/ static config to fit in internal flash |
