diff options
| author | JuliDi <[email protected]> | 2023-06-17 11:51:57 +0200 |
|---|---|---|
| committer | JuliDi <[email protected]> | 2023-06-17 11:51:57 +0200 |
| commit | 78a2ca8a0e5af3fe2c76a6cd025b74ea4322f6cf (patch) | |
| tree | 57a5f443c94c4c236a4ac8f119fd39380e9a4998 /embassy-stm32/src/dac | |
| parent | f5d084552d9f44d24f020269cc605de0fb4d1041 (diff) | |
remove unnecessary use, disable DAC and DMA after transfer
Diffstat (limited to 'embassy-stm32/src/dac')
| -rw-r--r-- | embassy-stm32/src/dac/mod.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/embassy-stm32/src/dac/mod.rs b/embassy-stm32/src/dac/mod.rs index 348d8bccd..7b81ec1f2 100644 --- a/embassy-stm32/src/dac/mod.rs +++ b/embassy-stm32/src/dac/mod.rs | |||
| @@ -2,7 +2,7 @@ | |||
| 2 | 2 | ||
| 3 | use embassy_hal_common::{into_ref, PeripheralRef}; | 3 | use embassy_hal_common::{into_ref, PeripheralRef}; |
| 4 | 4 | ||
| 5 | use crate::dma::{slice_ptr_parts, word, Transfer}; | 5 | use crate::dma::Transfer; |
| 6 | use crate::pac::dac; | 6 | use crate::pac::dac; |
| 7 | use crate::rcc::RccPeripheral; | 7 | use crate::rcc::RccPeripheral; |
| 8 | use crate::{peripherals, Peripheral}; | 8 | use crate::{peripherals, Peripheral}; |
| @@ -269,9 +269,9 @@ impl<'d, T: Instance, Tx> Dac<'d, T, Tx> { | |||
| 269 | 269 | ||
| 270 | T::regs().cr().modify(|w| { | 270 | T::regs().cr().modify(|w| { |
| 271 | // Disable the dac peripheral | 271 | // Disable the dac peripheral |
| 272 | //w.set_en(CHANNEL, false); | 272 | w.set_en(CHANNEL, false); |
| 273 | // Disable the DMA. TODO: Is this necessary? | 273 | // Disable the DMA. TODO: Is this necessary? |
| 274 | //w.set_dmaen(CHANNEL, false); | 274 | w.set_dmaen(CHANNEL, false); |
| 275 | }); | 275 | }); |
| 276 | } | 276 | } |
| 277 | Ok(()) | 277 | Ok(()) |
