Skip to content

Commit 498a6da

Browse files
committed
enable DMA for usart4
1 parent 6fe74d1 commit 498a6da

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
@@ -742,7 +742,7 @@ macro_rules! on_channel {
742742
};
743743
}
744744

745-
#[cfg(feature = "stm32f303")]
745+
#[cfg(any(feature = "stm32f303", feature = "stm32f302"))]
746746
on_channel!(dma1,
747747
serial::Rx<pac::USART1> => C5,
748748
serial::Tx<pac::USART1> => C4,
@@ -751,3 +751,18 @@ on_channel!(dma1,
751751
serial::Rx<pac::USART3> => C3,
752752
serial::Tx<pac::USART3> => C2,
753753
);
754+
755+
#[cfg(any(
756+
feature = "stm32f302xb",
757+
feature = "stm32f302xc",
758+
feature = "stm32f302xd",
759+
feature = "stm32f302xe",
760+
feature = "stm32f303xb",
761+
feature = "stm32f303xc",
762+
feature = "stm32f303xd",
763+
feature = "stm32f303xe",
764+
))]
765+
on_channel!(dma2,
766+
serial::Rx<pac::USART4> => C3,
767+
serial::Tx<pac::USART4> => C5,
768+
);

0 commit comments

Comments
 (0)