Have this currently, although needs work and some decisions made about safety vs flexibility: ```rust pub struct DmaWriteBuf<'a, T> { pub buf: &'a mut [T], // pub channel: DmaChannel, } unsafe impl<'a, T> WriteBuffer for DmaWriteBuf<'a, T> { type Word = T; unsafe fn write_buffer(&mut self) -> (*mut Self::Word, usize) { (self.buf.as_mut_ptr(), self.buf.len()) } } impl Drop for DmaWriteBuf<'_, T> { // todo: Hardcoded for DMA1 and Chan 3. // todo: Does this stop all transfers in progress? fn drop(&mut self) { unsafe { cfg_if! { if #[cfg(feature = "g4")] { (*pac::DMA1::ptr()).ifcr.write(|w| w.gif2().clear_bit()); } else if #[cfg(feature = "g0")] { } else if #[cfg(feature = "g0")] { (*pac::DMA::ptr()).ifcr.write(|w| w.cgif2().clear_bit()); } else { (*pac::DMA1::ptr()).ifcr.write(|w| w.cgif2().clear_bit()); } } cfg_if! { if #[cfg(feature = "f3")] { (*pac::DMA1::ptr()).ch2.cr.modify(|_, w| w.en().clear_bit()); } else if #[cfg(feature = "g0")] { (*pac::DMA::ptr()).ch2.cr.modify(|_, w| w.en().clear_bit()); } else { (*pac::DMA1::ptr()).ccr2.modify(|_, w| w.en().clear_bit()); } } } } }