diff options
| author | Dario Nieuwenhuis <[email protected]> | 2025-01-26 22:42:13 +0100 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2025-01-26 22:43:28 +0100 |
| commit | b1245858f355e764a17eda819198f68ad83883ab (patch) | |
| tree | 6fd7b65aa4e66c0874c71112b1d486bcb68928e6 /examples/stm32f7/src | |
| parent | c8d29a1e2cd3f28c3afdd52a679fcb49f67e812c (diff) | |
stm32/eth: rename PHY->Phy, GenericSMI -> GenericPhy. Remove unneeded unsafes.
We shouldn't use `unsafe` to mark merely "dangerous" actions, only actions that
actually cause UB.
Diffstat (limited to 'examples/stm32f7/src')
| -rw-r--r-- | examples/stm32f7/src/bin/eth.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/examples/stm32f7/src/bin/eth.rs b/examples/stm32f7/src/bin/eth.rs index f353af674..17ab7fc00 100644 --- a/examples/stm32f7/src/bin/eth.rs +++ b/examples/stm32f7/src/bin/eth.rs | |||
| @@ -5,8 +5,7 @@ use defmt::*; | |||
| 5 | use embassy_executor::Spawner; | 5 | use embassy_executor::Spawner; |
| 6 | use embassy_net::tcp::TcpSocket; | 6 | use embassy_net::tcp::TcpSocket; |
| 7 | use embassy_net::{Ipv4Address, StackResources}; | 7 | use embassy_net::{Ipv4Address, StackResources}; |
| 8 | use embassy_stm32::eth::generic_smi::GenericSMI; | 8 | use embassy_stm32::eth::{Ethernet, GenericPhy, PacketQueue}; |
| 9 | use embassy_stm32::eth::{Ethernet, PacketQueue}; | ||
| 10 | use embassy_stm32::peripherals::ETH; | 9 | use embassy_stm32::peripherals::ETH; |
| 11 | use embassy_stm32::rng::Rng; | 10 | use embassy_stm32::rng::Rng; |
| 12 | use embassy_stm32::time::Hertz; | 11 | use embassy_stm32::time::Hertz; |
| @@ -22,7 +21,7 @@ bind_interrupts!(struct Irqs { | |||
| 22 | HASH_RNG => rng::InterruptHandler<peripherals::RNG>; | 21 | HASH_RNG => rng::InterruptHandler<peripherals::RNG>; |
| 23 | }); | 22 | }); |
| 24 | 23 | ||
| 25 | type Device = Ethernet<'static, ETH, GenericSMI>; | 24 | type Device = Ethernet<'static, ETH, GenericPhy>; |
| 26 | 25 | ||
| 27 | #[embassy_executor::task] | 26 | #[embassy_executor::task] |
| 28 | async fn net_task(mut runner: embassy_net::Runner<'static, Device>) -> ! { | 27 | async fn net_task(mut runner: embassy_net::Runner<'static, Device>) -> ! { |
| @@ -77,7 +76,7 @@ async fn main(spawner: Spawner) -> ! { | |||
| 77 | p.PG13, | 76 | p.PG13, |
| 78 | p.PB13, | 77 | p.PB13, |
| 79 | p.PG11, | 78 | p.PG11, |
| 80 | GenericSMI::new_auto(), | 79 | GenericPhy::new_auto(), |
| 81 | mac_addr, | 80 | mac_addr, |
| 82 | ); | 81 | ); |
| 83 | 82 | ||
