From e3d7111c08be0ce1881bf01868fdef8fbd7e3416 Mon Sep 17 00:00:00 2001 From: Jesse Braham Date: Sun, 13 Jan 2019 21:08:13 -0800 Subject: [PATCH] Fix some long-standing errors and inconsistencies for USARTS --- src/serial.rs | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/src/serial.rs b/src/serial.rs index f95107f..11d9253 100644 --- a/src/serial.rs +++ b/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>, gpiob::PB6>], - rx => [gpioa::PA10>, gpiob::PB6>], + rx => [gpioa::PA10>, gpiob::PB7>], } } #[cfg(any(feature = "stm32f030x6", feature = "stm32f031", feature = "stm32f038"))] @@ -137,19 +142,6 @@ usart_pins! { rx => [gpioa::PA3>, gpioa::PA15>], } } -#[cfg(any( - feature = "stm32f031", - feature = "stm32f038", - feature = "stm32f070", - feature = "stm32f072", - feature = "stm32f091", -))] -usart_pins! { - USART1 => { - tx => [gpioa::PA9>, gpiob::PB6>], - rx => [gpioa::PA10>, gpiob::PB7>], - } -} #[cfg(any( feature = "stm32f030x8",