Browse Source

Fix some long-standing errors and inconsistencies for USARTS

trying.tmp
Jesse Braham 4 years ago
parent
commit
e3d7111c08
  1. 22
      src/serial.rs

22
src/serial.rs

@ -116,18 +116,23 @@ macro_rules! usart_pins {
#[cfg(any(
feature = "stm32f030",
feature = "stm32f031",
feature = "stm32f038",
feature = "stm32f042",
feature = "stm32f048",
feature = "stm32f051",
feature = "stm32f058",
feature = "stm32f070",
feature = "stm32f071",
feature = "stm32f072",
feature = "stm32f078",
feature = "stm32f091",
feature = "stm32f098",
))]
usart_pins! {
USART1 => {
USART1 => {
tx => [gpioa::PA9<Alternate<AF1>>, gpiob::PB6<Alternate<AF0>>],
rx => [gpioa::PA10<Alternate<AF1>>, gpiob::PB6<Alternate<AF0>>],
rx => [gpioa::PA10<Alternate<AF1>>, gpiob::PB7<Alternate<AF0>>],
}
}
#[cfg(any(feature = "stm32f030x6", feature = "stm32f031", feature = "stm32f038"))]
@ -137,19 +142,6 @@ usart_pins! {
rx => [gpioa::PA3<Alternate<AF1>>, gpioa::PA15<Alternate<AF1>>],
}
}
#[cfg(any(
feature = "stm32f031",
feature = "stm32f038",
feature = "stm32f070",
feature = "stm32f072",
feature = "stm32f091",
))]
usart_pins! {
USART1 => {
tx => [gpioa::PA9<Alternate<AF1>>, gpiob::PB6<Alternate<AF0>>],
rx => [gpioa::PA10<Alternate<AF1>>, gpiob::PB7<Alternate<AF0>>],
}
}
#[cfg(any(
feature = "stm32f030x8",

Loading…
Cancel
Save