aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--embassy-stm32/src/dmamux/mod.rs6
1 files 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(
57 src: &[u8], 57 src: &[u8],
58 dst: *mut u8, 58 dst: *mut u8,
59) { 59) {
60 let dmamux_regs = ch.dmamux_regs();
61 let ch_mux_regs = dmamux_regs.ccr(ch.dmamux_ch_num() as _);
60 unimplemented!() 62 unimplemented!()
61} 63}
62 64
@@ -68,7 +70,7 @@ pub(crate) mod sealed {
68 } 70 }
69 71
70 pub trait Channel { 72 pub trait Channel {
71 fn dmamux_regs() -> &'static pac::dmamux::Dmamux; 73 fn dmamux_regs(&self) -> &'static pac::dmamux::Dmamux;
72 fn dmamux_ch_num(&self) -> u8; 74 fn dmamux_ch_num(&self) -> u8;
73 } 75 }
74 76
@@ -88,7 +90,7 @@ macro_rules! impl_dma_channel {
88 ($channel_peri:ident, $dmamux_peri:ident, $channel_num:expr, $dma_num:expr) => { 90 ($channel_peri:ident, $dmamux_peri:ident, $channel_num:expr, $dma_num:expr) => {
89 impl Channel for peripherals::$channel_peri {} 91 impl Channel for peripherals::$channel_peri {}
90 impl sealed::Channel for peripherals::$channel_peri { 92 impl sealed::Channel for peripherals::$channel_peri {
91 fn dmamux_regs() -> &'static pac::dmamux::Dmamux { 93 fn dmamux_regs(&self) -> &'static pac::dmamux::Dmamux {
92 &crate::pac::$dmamux_peri 94 &crate::pac::$dmamux_peri
93 } 95 }
94 96