remove unnecessary use, disable DAC and DMA after transfer

This commit is contained in:
JuliDi 2023-06-17 11:51:57 +02:00
parent f5d084552d
commit 78a2ca8a0e
No known key found for this signature in database
GPG Key ID: E1E90AE563D09D63

View File

@ -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(())