diff options
| author | Jan Špaček <[email protected]> | 2024-05-24 22:04:04 +0200 |
|---|---|---|
| committer | Jan Špaček <[email protected]> | 2024-05-25 18:44:55 +0200 |
| commit | 081afca3f065dfd91e157d7c9a9477e2d914c99d (patch) | |
| tree | 574b29636674d3e5a9e3763d00f709635856403e /embassy-stm32/src/dsihost.rs | |
| parent | 01c1cb2764300625f80b24e70052f250de27d814 (diff) | |
stm32/rcc: replace generated enable/disable code with runtime info
Diffstat (limited to 'embassy-stm32/src/dsihost.rs')
| -rw-r--r-- | embassy-stm32/src/dsihost.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/embassy-stm32/src/dsihost.rs b/embassy-stm32/src/dsihost.rs index f1c737fdc..447665669 100644 --- a/embassy-stm32/src/dsihost.rs +++ b/embassy-stm32/src/dsihost.rs | |||
| @@ -6,7 +6,7 @@ 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::rcc::{self, RccPeripheral}; |
| 10 | use crate::{peripherals, Peripheral}; | 10 | use crate::{peripherals, Peripheral}; |
| 11 | 11 | ||
| 12 | /// Performs a busy-wait delay for a specified number of microseconds. | 12 | /// Performs a busy-wait delay for a specified number of microseconds. |
| @@ -77,7 +77,7 @@ impl<'d, T: Instance> DsiHost<'d, T> { | |||
| 77 | pub fn new(_peri: impl Peripheral<P = T> + 'd, te: impl Peripheral<P = impl TePin<T>> + 'd) -> Self { | 77 | pub fn new(_peri: impl Peripheral<P = T> + 'd, te: impl Peripheral<P = impl TePin<T>> + 'd) -> Self { |
| 78 | into_ref!(te); | 78 | into_ref!(te); |
| 79 | 79 | ||
| 80 | T::enable_and_reset(); | 80 | rcc::enable_and_reset::<T>(); |
| 81 | 81 | ||
| 82 | // Set Tearing Enable pin according to CubeMx example | 82 | // Set Tearing Enable pin according to CubeMx example |
| 83 | te.set_as_af_pull(te.af_num(), AFType::OutputPushPull, Pull::None); | 83 | te.set_as_af_pull(te.af_num(), AFType::OutputPushPull, Pull::None); |
