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/sai | |
| parent | 01c1cb2764300625f80b24e70052f250de27d814 (diff) | |
stm32/rcc: replace generated enable/disable code with runtime info
Diffstat (limited to 'embassy-stm32/src/sai')
| -rw-r--r-- | embassy-stm32/src/sai/mod.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/embassy-stm32/src/sai/mod.rs b/embassy-stm32/src/sai/mod.rs index 54dd81524..3faecdc33 100644 --- a/embassy-stm32/src/sai/mod.rs +++ b/embassy-stm32/src/sai/mod.rs | |||
| @@ -11,7 +11,7 @@ pub use crate::dma::word; | |||
| 11 | use crate::dma::{ringbuffer, Channel, ReadableRingBuffer, Request, TransferOptions, WritableRingBuffer}; | 11 | use crate::dma::{ringbuffer, Channel, ReadableRingBuffer, Request, TransferOptions, WritableRingBuffer}; |
| 12 | use crate::gpio::{AFType, AnyPin, SealedPin as _}; | 12 | use crate::gpio::{AFType, AnyPin, SealedPin as _}; |
| 13 | use crate::pac::sai::{vals, Sai as Regs}; | 13 | use crate::pac::sai::{vals, Sai as Regs}; |
| 14 | use crate::rcc::RccPeripheral; | 14 | use crate::rcc::{self, RccPeripheral}; |
| 15 | use crate::{peripherals, Peripheral}; | 15 | use crate::{peripherals, Peripheral}; |
| 16 | 16 | ||
| 17 | /// SAI error | 17 | /// SAI error |
| @@ -722,7 +722,7 @@ pub struct SubBlock<'d, T, S: SubBlockInstance> { | |||
| 722 | /// You can then create a [`Sai`] driver for each each half. | 722 | /// You can then create a [`Sai`] driver for each each half. |
| 723 | pub fn split_subblocks<'d, T: Instance>(peri: impl Peripheral<P = T> + 'd) -> (SubBlock<'d, T, A>, SubBlock<'d, T, B>) { | 723 | pub fn split_subblocks<'d, T: Instance>(peri: impl Peripheral<P = T> + 'd) -> (SubBlock<'d, T, A>, SubBlock<'d, T, B>) { |
| 724 | into_ref!(peri); | 724 | into_ref!(peri); |
| 725 | T::enable_and_reset(); | 725 | rcc::enable_and_reset::<T>(); |
| 726 | 726 | ||
| 727 | ( | 727 | ( |
| 728 | SubBlock { | 728 | SubBlock { |
| @@ -978,7 +978,7 @@ impl<'d, T: Instance, W: word::Word> Sai<'d, T, W> { | |||
| 978 | 978 | ||
| 979 | /// Reset SAI operation. | 979 | /// Reset SAI operation. |
| 980 | pub fn reset() { | 980 | pub fn reset() { |
| 981 | T::enable_and_reset(); | 981 | rcc::enable_and_reset::<T>(); |
| 982 | } | 982 | } |
| 983 | 983 | ||
| 984 | /// Flush. | 984 | /// Flush. |
