diff options
| author | Dario Nieuwenhuis <[email protected]> | 2023-10-09 02:48:22 +0200 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2023-10-09 02:48:22 +0200 |
| commit | 6186fe08070c5f497d72586640db287193b41894 (patch) | |
| tree | aaef02d5344086bde66725a853851546961520fa /examples/stm32h5/src/bin/eth.rs | |
| parent | c4cff0b79bc54634db9d0fa24a24add49b7ec7fe (diff) | |
stm32/rcc: use PLL enums from PAC.
Diffstat (limited to 'examples/stm32h5/src/bin/eth.rs')
| -rw-r--r-- | examples/stm32h5/src/bin/eth.rs | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/examples/stm32h5/src/bin/eth.rs b/examples/stm32h5/src/bin/eth.rs index 4e92d0647..2f4454761 100644 --- a/examples/stm32h5/src/bin/eth.rs +++ b/examples/stm32h5/src/bin/eth.rs | |||
| @@ -9,7 +9,9 @@ use embassy_net::{Ipv4Address, Stack, StackResources}; | |||
| 9 | use embassy_stm32::eth::generic_smi::GenericSMI; | 9 | use embassy_stm32::eth::generic_smi::GenericSMI; |
| 10 | use embassy_stm32::eth::{Ethernet, PacketQueue}; | 10 | use embassy_stm32::eth::{Ethernet, PacketQueue}; |
| 11 | use embassy_stm32::peripherals::ETH; | 11 | use embassy_stm32::peripherals::ETH; |
| 12 | use embassy_stm32::rcc::{AHBPrescaler, APBPrescaler, Hse, HseMode, Pll, PllSource, Sysclk, VoltageScale}; | 12 | use embassy_stm32::rcc::{ |
| 13 | AHBPrescaler, APBPrescaler, Hse, HseMode, Pll, PllDiv, PllMul, PllPreDiv, PllSource, Sysclk, VoltageScale, | ||
| 14 | }; | ||
| 13 | use embassy_stm32::rng::Rng; | 15 | use embassy_stm32::rng::Rng; |
| 14 | use embassy_stm32::time::Hertz; | 16 | use embassy_stm32::time::Hertz; |
| 15 | use embassy_stm32::{bind_interrupts, eth, peripherals, rng, Config}; | 17 | use embassy_stm32::{bind_interrupts, eth, peripherals, rng, Config}; |
| @@ -42,10 +44,10 @@ async fn main(spawner: Spawner) -> ! { | |||
| 42 | }); | 44 | }); |
| 43 | config.rcc.pll1 = Some(Pll { | 45 | config.rcc.pll1 = Some(Pll { |
| 44 | source: PllSource::Hse, | 46 | source: PllSource::Hse, |
| 45 | prediv: 2, | 47 | prediv: PllPreDiv::DIV2, |
| 46 | mul: 125, | 48 | mul: PllMul::MUL125, |
| 47 | divp: Some(2), | 49 | divp: Some(PllDiv::DIV2), |
| 48 | divq: Some(2), | 50 | divq: Some(PllDiv::DIV2), |
| 49 | divr: None, | 51 | divr: None, |
| 50 | }); | 52 | }); |
| 51 | config.rcc.ahb_pre = AHBPrescaler::DIV1; | 53 | config.rcc.ahb_pre = AHBPrescaler::DIV1; |
