aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--embassy-stm32/src/dsihost.rs3
-rw-r--r--embassy-stm32/src/ltdc.rs9
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
3use crate::rcc::RccPeripheral;
4use core::marker::PhantomData; 3use core::marker::PhantomData;
4
5use embassy_hal_internal::{into_ref, PeripheralRef}; 5use embassy_hal_internal::{into_ref, PeripheralRef};
6 6
7//use crate::gpio::{AnyPin, SealedPin}; 7//use crate::gpio::{AnyPin, SealedPin};
8use crate::gpio::{AFType, AnyPin, Pull, Speed}; 8use crate::gpio::{AFType, AnyPin, Pull, Speed};
9use crate::rcc::RccPeripheral;
9use crate::{peripherals, Peripheral}; 10use 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
2use core::marker::PhantomData;
3
2use crate::rcc::RccPeripheral; 4use crate::rcc::RccPeripheral;
3use crate::{peripherals, Peripheral}; 5use crate::{peripherals, Peripheral};
4use core::marker::PhantomData;
5 6
6/// LTDC driver. 7/// LTDC driver.
7pub struct Ltdc<'d, T: Instance> { 8pub 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));