diff options
| author | Dario Nieuwenhuis <[email protected]> | 2023-09-24 23:54:32 +0200 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2023-09-25 01:07:55 +0200 |
| commit | e03239e88d7f2d01f31de5e5eef2b4d79522679d (patch) | |
| tree | 077c0a9cb985a857f1eec1a4b2f5b348d5a25319 /embassy-stm32/src/eth | |
| parent | 65d36f9f99c3b8055e7b9c02e1b1aae3cb242d6a (diff) | |
stm32: centralize enabling pwr, syscfg, flash.
Diffstat (limited to 'embassy-stm32/src/eth')
| -rw-r--r-- | embassy-stm32/src/eth/v1/mod.rs | 1 | ||||
| -rw-r--r-- | embassy-stm32/src/eth/v2/mod.rs | 1 |
2 files changed, 0 insertions, 2 deletions
diff --git a/embassy-stm32/src/eth/v1/mod.rs b/embassy-stm32/src/eth/v1/mod.rs index a1e0240c8..4d19103dd 100644 --- a/embassy-stm32/src/eth/v1/mod.rs +++ b/embassy-stm32/src/eth/v1/mod.rs | |||
| @@ -129,7 +129,6 @@ impl<'d, T: Instance, P: PHY> Ethernet<'d, T, P> { | |||
| 129 | 129 | ||
| 130 | #[cfg(any(eth_v1b, eth_v1c))] | 130 | #[cfg(any(eth_v1b, eth_v1c))] |
| 131 | critical_section::with(|_| { | 131 | critical_section::with(|_| { |
| 132 | RCC.apb2enr().modify(|w| w.set_syscfgen(true)); | ||
| 133 | RCC.ahb1enr().modify(|w| { | 132 | RCC.ahb1enr().modify(|w| { |
| 134 | w.set_ethen(true); | 133 | w.set_ethen(true); |
| 135 | w.set_ethtxen(true); | 134 | w.set_ethtxen(true); |
diff --git a/embassy-stm32/src/eth/v2/mod.rs b/embassy-stm32/src/eth/v2/mod.rs index ada495fdb..f03ea2e31 100644 --- a/embassy-stm32/src/eth/v2/mod.rs +++ b/embassy-stm32/src/eth/v2/mod.rs | |||
| @@ -80,7 +80,6 @@ impl<'d, T: Instance, P: PHY> Ethernet<'d, T, P> { | |||
| 80 | // Enable the necessary Clocks | 80 | // Enable the necessary Clocks |
| 81 | #[cfg(not(rcc_h5))] | 81 | #[cfg(not(rcc_h5))] |
| 82 | critical_section::with(|_| { | 82 | critical_section::with(|_| { |
| 83 | crate::pac::RCC.apb4enr().modify(|w| w.set_syscfgen(true)); | ||
| 84 | crate::pac::RCC.ahb1enr().modify(|w| { | 83 | crate::pac::RCC.ahb1enr().modify(|w| { |
| 85 | w.set_eth1macen(true); | 84 | w.set_eth1macen(true); |
| 86 | w.set_eth1txen(true); | 85 | w.set_eth1txen(true); |
