diff options
| author | Dario Nieuwenhuis <[email protected]> | 2022-02-10 21:38:03 +0100 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2022-02-10 21:38:03 +0100 |
| commit | b99ab3d5d9d8fdee135956dcbc2111b00abd1d72 (patch) | |
| tree | 53f3723e24ba49b98f0a792aa9835141ef56729e /examples/stm32h7/src/bin/eth.rs | |
| parent | 9d682aa1fae81d9bb56bb41304828144b9a0d4a7 (diff) | |
stm32: Add standard crate-wide macros for pin/dma traits, switch all drivers to use them.
Diffstat (limited to 'examples/stm32h7/src/bin/eth.rs')
| -rw-r--r-- | examples/stm32h7/src/bin/eth.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/stm32h7/src/bin/eth.rs b/examples/stm32h7/src/bin/eth.rs index 9998bc4e9..47d8c5c56 100644 --- a/examples/stm32h7/src/bin/eth.rs +++ b/examples/stm32h7/src/bin/eth.rs | |||
| @@ -4,6 +4,7 @@ | |||
| 4 | 4 | ||
| 5 | #[path = "../example_common.rs"] | 5 | #[path = "../example_common.rs"] |
| 6 | mod example_common; | 6 | mod example_common; |
| 7 | use embassy_stm32::peripherals::ETH; | ||
| 7 | use example_common::config; | 8 | use example_common::config; |
| 8 | 9 | ||
| 9 | use cortex_m_rt::entry; | 10 | use cortex_m_rt::entry; |
| @@ -26,7 +27,7 @@ use peripherals::RNG; | |||
| 26 | 27 | ||
| 27 | #[embassy::task] | 28 | #[embassy::task] |
| 28 | async fn main_task( | 29 | async fn main_task( |
| 29 | device: &'static mut Ethernet<'static, LAN8742A, 4, 4>, | 30 | device: &'static mut Ethernet<'static, ETH, LAN8742A, 4, 4>, |
| 30 | config: &'static mut StaticConfigurator, | 31 | config: &'static mut StaticConfigurator, |
| 31 | spawner: Spawner, | 32 | spawner: Spawner, |
| 32 | ) { | 33 | ) { |
| @@ -81,8 +82,8 @@ fn _embassy_rand(buf: &mut [u8]) { | |||
| 81 | static mut RNG_INST: Option<Rng<RNG>> = None; | 82 | static mut RNG_INST: Option<Rng<RNG>> = None; |
| 82 | 83 | ||
| 83 | static EXECUTOR: Forever<Executor> = Forever::new(); | 84 | static EXECUTOR: Forever<Executor> = Forever::new(); |
| 84 | static STATE: Forever<State<'static, 4, 4>> = Forever::new(); | 85 | static STATE: Forever<State<'static, ETH, 4, 4>> = Forever::new(); |
| 85 | static ETH: Forever<Ethernet<'static, LAN8742A, 4, 4>> = Forever::new(); | 86 | static ETH: Forever<Ethernet<'static, ETH, LAN8742A, 4, 4>> = Forever::new(); |
| 86 | static CONFIG: Forever<StaticConfigurator> = Forever::new(); | 87 | static CONFIG: Forever<StaticConfigurator> = Forever::new(); |
| 87 | static NET_RESOURCES: Forever<StackResources<1, 2, 8>> = Forever::new(); | 88 | static NET_RESOURCES: Forever<StackResources<1, 2, 8>> = Forever::new(); |
| 88 | 89 | ||
