Skip to content

Commit 9655ed9

Browse files
sprhawkteskje
authored andcommitted
enable DMA for usart4
1 parent 6b60fcc commit 9655ed9

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

src/dma.rs

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ macro_rules! on_channel {
531531
};
532532
}
533533

534-
#[cfg(feature = "stm32f303")]
534+
#[cfg(any(feature = "stm32f303", feature = "stm32f302"))]
535535
on_channel!(dma1,
536536
serial::Rx<pac::USART1> => C5,
537537
serial::Tx<pac::USART1> => C4,
@@ -540,3 +540,18 @@ on_channel!(dma1,
540540
serial::Rx<pac::USART3> => C3,
541541
serial::Tx<pac::USART3> => C2,
542542
);
543+
544+
#[cfg(any(
545+
feature = "stm32f302xb",
546+
feature = "stm32f302xc",
547+
feature = "stm32f302xd",
548+
feature = "stm32f302xe",
549+
feature = "stm32f303xb",
550+
feature = "stm32f303xc",
551+
feature = "stm32f303xd",
552+
feature = "stm32f303xe",
553+
))]
554+
on_channel!(dma2,
555+
serial::Rx<pac::USART4> => C3,
556+
serial::Tx<pac::USART4> => C5,
557+
);

0 commit comments

Comments
 (0)