stm32: fix build for h7ab

This commit is contained in:
Dario Nieuwenhuis
2022-02-24 05:59:42 +01:00
parent 1ff80f8438
commit ea5cd19c30
7 changed files with 38 additions and 25 deletions

View File

@ -49,6 +49,12 @@ macro_rules! dma_num {
(BDMA) => {
0
};
(BDMA1) => {
0
};
(BDMA2) => {
1
};
}
pub(crate) unsafe fn on_irq() {
@ -80,6 +86,9 @@ pub(crate) unsafe fn init() {
}
pac::dma_channels! {
($channel_peri:ident, BDMA1, bdma, $channel_num:expr, $dmamux:tt) => {
// BDMA1 in H7 doesn't use DMAMUX, which breaks
};
($channel_peri:ident, $dma_peri:ident, bdma, $channel_num:expr, $dmamux:tt) => {
impl crate::dma::sealed::Channel for crate::peripherals::$channel_peri {

View File

@ -28,7 +28,7 @@ pub(crate) mod sealed {
}
pub struct DMAMUX1;
#[cfg(rcc_h7)]
#[cfg(stm32h7)]
pub struct DMAMUX2;
pub trait MuxChannel: sealed::MuxChannel + super::Channel {