stm32/dma: add MuxChannel trait to distinguish DMAMUX1 and DMAMUX2 channels.

This commit is contained in:
Dario Nieuwenhuis
2021-07-17 07:49:49 +02:00
parent 54b5012c56
commit 3655048e0f
5 changed files with 37 additions and 14 deletions

View File

@ -175,9 +175,9 @@ pac::dma_channels! {
buf.as_mut_ptr(),
buf.len(),
#[cfg(dmamux)]
<Self as super::dmamux::MuxChannel>::DMAMUX_REGS,
<Self as super::dmamux::sealed::MuxChannel>::DMAMUX_REGS,
#[cfg(dmamux)]
<Self as super::dmamux::MuxChannel>::DMAMUX_CH_NUM,
<Self as super::dmamux::sealed::MuxChannel>::DMAMUX_CH_NUM,
)
}
}
@ -199,9 +199,9 @@ pac::dma_channels! {
buf.as_ptr() as *mut u8,
buf.len(),
#[cfg(dmamux)]
<Self as super::dmamux::MuxChannel>::DMAMUX_REGS,
<Self as super::dmamux::sealed::MuxChannel>::DMAMUX_REGS,
#[cfg(dmamux)]
<Self as super::dmamux::MuxChannel>::DMAMUX_CH_NUM,
<Self as super::dmamux::sealed::MuxChannel>::DMAMUX_CH_NUM,
)
}
}