stm32: Only declare alternate usart2 on stm32f0
Also, try to improve the structure of the #if/#else/#endif layout in serial.c. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
@@ -157,7 +157,7 @@ choice
|
||||
config STM32_SERIAL_USART2
|
||||
bool "USART2 (on PA3/PA2)"
|
||||
config STM32_SERIAL_USART2_ALT
|
||||
bool "USART2 (on PA15/PA14)"
|
||||
bool "USART2 (on PA15/PA14)" if MACH_STM32F0
|
||||
config STM32_SERIAL_USART3
|
||||
bool "USART3"
|
||||
config STM32_SERIAL_USART3_ALT
|
||||
@@ -165,10 +165,8 @@ choice
|
||||
endchoice
|
||||
config SERIAL_PORT
|
||||
int
|
||||
default 103 if STM32_SERIAL_USART3_ALT
|
||||
default 3 if STM32_SERIAL_USART3
|
||||
default 102 if STM32_SERIAL_USART2_ALT
|
||||
default 2 if STM32_SERIAL_USART2
|
||||
default 3 if STM32_SERIAL_USART3 || STM32_SERIAL_USART3_ALT
|
||||
default 2 if STM32_SERIAL_USART2 || STM32_SERIAL_USART2_ALT
|
||||
default 1
|
||||
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user