diff options
| -rw-r--r-- | embassy-stm32/src/dsihost.rs | 3 | ||||
| -rw-r--r-- | embassy-stm32/src/ltdc.rs | 9 |
2 files changed, 10 insertions, 2 deletions
diff --git a/embassy-stm32/src/dsihost.rs b/embassy-stm32/src/dsihost.rs index 0537d22cf..c711672c8 100644 --- a/embassy-stm32/src/dsihost.rs +++ b/embassy-stm32/src/dsihost.rs | |||
| @@ -1,11 +1,12 @@ | |||
| 1 | //! DSI HOST | 1 | //! DSI HOST |
| 2 | 2 | ||
| 3 | use crate::rcc::RccPeripheral; | ||
| 4 | use core::marker::PhantomData; | 3 | use core::marker::PhantomData; |
| 4 | |||
| 5 | use embassy_hal_internal::{into_ref, PeripheralRef}; | 5 | use embassy_hal_internal::{into_ref, PeripheralRef}; |
| 6 | 6 | ||
| 7 | //use crate::gpio::{AnyPin, SealedPin}; | 7 | //use crate::gpio::{AnyPin, SealedPin}; |
| 8 | use crate::gpio::{AFType, AnyPin, Pull, Speed}; | 8 | use crate::gpio::{AFType, AnyPin, Pull, Speed}; |
| 9 | use crate::rcc::RccPeripheral; | ||
| 9 | use crate::{peripherals, Peripheral}; | 10 | use crate::{peripherals, Peripheral}; |
| 10 | 11 | ||
| 11 | /// Performs a busy-wait delay for a specified number of microseconds. | 12 | /// Performs a busy-wait delay for a specified number of microseconds. |
diff --git a/embassy-stm32/src/ltdc.rs b/embassy-stm32/src/ltdc.rs index 1cdf71e7e..f261fce38 100644 --- a/embassy-stm32/src/ltdc.rs +++ b/embassy-stm32/src/ltdc.rs | |||
| @@ -1,7 +1,8 @@ | |||
| 1 | //! LTDC | 1 | //! LTDC |
| 2 | use core::marker::PhantomData; | ||
| 3 | |||
| 2 | use crate::rcc::RccPeripheral; | 4 | use crate::rcc::RccPeripheral; |
| 3 | use crate::{peripherals, Peripheral}; | 5 | use crate::{peripherals, Peripheral}; |
| 4 | use core::marker::PhantomData; | ||
| 5 | 6 | ||
| 6 | /// LTDC driver. | 7 | /// LTDC driver. |
| 7 | pub struct Ltdc<'d, T: Instance> { | 8 | pub struct Ltdc<'d, T: Instance> { |
| @@ -47,6 +48,12 @@ impl<'d, T: Instance> Ltdc<'d, T> { | |||
| 47 | critical_section::with(|_cs| { | 48 | critical_section::with(|_cs| { |
| 48 | // RM says the pllsaidivr should only be changed when pllsai is off. But this could have other unintended side effects. So let's just give it a try like this. | 49 | // RM says the pllsaidivr should only be changed when pllsai is off. But this could have other unintended side effects. So let's just give it a try like this. |
| 49 | // According to the debugger, this bit gets set, anyway. | 50 | // According to the debugger, this bit gets set, anyway. |
| 51 | #[cfg(stm32f7)] | ||
| 52 | stm32_metapac::RCC | ||
| 53 | .dckcfgr1() | ||
| 54 | .modify(|w| w.set_pllsaidivr(stm32_metapac::rcc::vals::Pllsaidivr::DIV2)); | ||
| 55 | |||
| 56 | #[cfg(not(stm32f7))] | ||
| 50 | stm32_metapac::RCC | 57 | stm32_metapac::RCC |
| 51 | .dckcfgr() | 58 | .dckcfgr() |
| 52 | .modify(|w| w.set_pllsaidivr(stm32_metapac::rcc::vals::Pllsaidivr::DIV2)); | 59 | .modify(|w| w.set_pllsaidivr(stm32_metapac::rcc::vals::Pllsaidivr::DIV2)); |
