diff options
| author | pbert <[email protected]> | 2023-10-11 21:38:41 +0200 |
|---|---|---|
| committer | pbert <[email protected]> | 2023-10-12 11:04:44 +0200 |
| commit | ecdd7c0e2f9dcc07e53e136557140d3ccc6a5ee1 (patch) | |
| tree | 6db9bf875d3e83d94f6bf8e8a2e7ff03a83c5bb4 /embassy-stm32/src/sai | |
| parent | d7d79f3068a4a2d883b078b8900ad194f7c98203 (diff) | |
enable clock first
Diffstat (limited to 'embassy-stm32/src/sai')
| -rw-r--r-- | embassy-stm32/src/sai/mod.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/embassy-stm32/src/sai/mod.rs b/embassy-stm32/src/sai/mod.rs index a394ba717..a0b4ddac7 100644 --- a/embassy-stm32/src/sai/mod.rs +++ b/embassy-stm32/src/sai/mod.rs | |||
| @@ -580,7 +580,7 @@ fn get_ring_buffer<'d, T: Instance, C: Channel, W: word::Word>( | |||
| 580 | 580 | ||
| 581 | impl<'d, T: Instance> Sai<'d, T> { | 581 | impl<'d, T: Instance> Sai<'d, T> { |
| 582 | pub fn new(peri: impl Peripheral<P = T> + 'd) -> Self { | 582 | pub fn new(peri: impl Peripheral<P = T> + 'd) -> Self { |
| 583 | T::reset_and_enable(); | 583 | T::enable_and_reset(); |
| 584 | 584 | ||
| 585 | Self { | 585 | Self { |
| 586 | _peri: unsafe { peri.clone_unchecked().into_ref() }, | 586 | _peri: unsafe { peri.clone_unchecked().into_ref() }, |
| @@ -960,7 +960,7 @@ impl<'d, T: Instance, C: Channel, W: word::Word> SubBlock<'d, T, C, W> { | |||
| 960 | } | 960 | } |
| 961 | 961 | ||
| 962 | pub fn reset() { | 962 | pub fn reset() { |
| 963 | T::reset_and_enable(); | 963 | T::enable_and_reset(); |
| 964 | } | 964 | } |
| 965 | 965 | ||
| 966 | pub fn flush(&mut self) { | 966 | pub fn flush(&mut self) { |
