diff options
author | Elias Bakken <elias@iagent.no> | 2021-02-03 18:23:17 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-03 12:23:17 -0500 |
commit | 8b443acae8adc0c9d1f38a7a9a59dd9b40b12ffe (patch) | |
tree | 74ba4de560fff8ea46589a921aa3078ea60acbf9 /src/stm32/stm32f0_serial.c | |
parent | 3162f4746fe27594ce1bc1986f9201a6a4a32ce2 (diff) | |
download | kutter-8b443acae8adc0c9d1f38a7a9a59dd9b40b12ffe.tar.gz kutter-8b443acae8adc0c9d1f38a7a9a59dd9b40b12ffe.tar.xz kutter-8b443acae8adc0c9d1f38a7a9a59dd9b40b12ffe.zip |
stm32: Adding support for STM32F031x6 (#3871)
Add support for alt usart 1
Do not select all functions on 16 K mcu
Signed-off-by: Elias Bakken <elias@iagent.no>
Diffstat (limited to 'src/stm32/stm32f0_serial.c')
-rw-r--r-- | src/stm32/stm32f0_serial.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/stm32/stm32f0_serial.c b/src/stm32/stm32f0_serial.c index 2ea71f0c..5736e109 100644 --- a/src/stm32/stm32f0_serial.c +++ b/src/stm32/stm32f0_serial.c @@ -13,9 +13,15 @@ // Select the configured serial port #if CONFIG_SERIAL_PORT == 1 - DECL_CONSTANT_STR("RESERVE_PINS_serial", "PA10,PA9"); - #define GPIO_Rx GPIO('A', 10) - #define GPIO_Tx GPIO('A', 9) + #if CONFIG_STM32_SERIAL_USART1_ALT + DECL_CONSTANT_STR("RESERVE_PINS_serial", "PA15,PA14"); + #define GPIO_Rx GPIO('A', 15) + #define GPIO_Tx GPIO('A', 14) + #else + DECL_CONSTANT_STR("RESERVE_PINS_serial", "PA10,PA9"); + #define GPIO_Rx GPIO('A', 10) + #define GPIO_Tx GPIO('A', 9) + #endif #define USARTx USART1 #define USARTx_IRQn USART1_IRQn #elif CONFIG_SERIAL_PORT == 2 |