From acdf7f4f1380672a07045226df8fe74dffcb21dd Mon Sep 17 00:00:00 2001 From: Bob McWhirter Date: Fri, 2 Jul 2021 13:46:52 -0400 Subject: [PATCH] Another checkpoint. --- embassy-stm32/src/dmamux/mod.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/embassy-stm32/src/dmamux/mod.rs b/embassy-stm32/src/dmamux/mod.rs index fc043a3f8..bbc4bfb1b 100644 --- a/embassy-stm32/src/dmamux/mod.rs +++ b/embassy-stm32/src/dmamux/mod.rs @@ -57,6 +57,8 @@ pub(crate) async unsafe fn transfer_m2p( src: &[u8], dst: *mut u8, ) { + let dmamux_regs = ch.dmamux_regs(); + let ch_mux_regs = dmamux_regs.ccr(ch.dmamux_ch_num() as _); unimplemented!() } @@ -68,7 +70,7 @@ pub(crate) mod sealed { } pub trait Channel { - fn dmamux_regs() -> &'static pac::dmamux::Dmamux; + fn dmamux_regs(&self) -> &'static pac::dmamux::Dmamux; fn dmamux_ch_num(&self) -> u8; } @@ -88,7 +90,7 @@ macro_rules! impl_dma_channel { ($channel_peri:ident, $dmamux_peri:ident, $channel_num:expr, $dma_num:expr) => { impl Channel for peripherals::$channel_peri {} impl sealed::Channel for peripherals::$channel_peri { - fn dmamux_regs() -> &'static pac::dmamux::Dmamux { + fn dmamux_regs(&self) -> &'static pac::dmamux::Dmamux { &crate::pac::$dmamux_peri }