From 78a2ca8a0e5af3fe2c76a6cd025b74ea4322f6cf Mon Sep 17 00:00:00 2001 From: JuliDi <20155974+JuliDi@users.noreply.github.com> Date: Sat, 17 Jun 2023 11:51:57 +0200 Subject: [PATCH] remove unnecessary use, disable DAC and DMA after transfer --- embassy-stm32/src/dac/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/embassy-stm32/src/dac/mod.rs b/embassy-stm32/src/dac/mod.rs index 348d8bcc..7b81ec1f 100644 --- a/embassy-stm32/src/dac/mod.rs +++ b/embassy-stm32/src/dac/mod.rs @@ -2,7 +2,7 @@ use embassy_hal_common::{into_ref, PeripheralRef}; -use crate::dma::{slice_ptr_parts, word, Transfer}; +use crate::dma::Transfer; use crate::pac::dac; use crate::rcc::RccPeripheral; use crate::{peripherals, Peripheral}; @@ -269,9 +269,9 @@ impl<'d, T: Instance, Tx> Dac<'d, T, Tx> { T::regs().cr().modify(|w| { // Disable the dac peripheral - //w.set_en(CHANNEL, false); + w.set_en(CHANNEL, false); // Disable the DMA. TODO: Is this necessary? - //w.set_dmaen(CHANNEL, false); + w.set_dmaen(CHANNEL, false); }); } Ok(())