Skip to content

Commit fc8453d

Browse files
committed
fixup
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parent 834e900 commit fc8453d

File tree

2 files changed

+6
-9
lines changed
  • cores/arduino/stm32
  • libraries/SrcWrapper/src/stm32

2 files changed

+6
-9
lines changed

cores/arduino/stm32/uart.h

+4-7
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ struct serial_s {
116116
#elif defined(LPUART1_BASE)
117117
#define USART3_IRQn USART3_4_LPUART1_IRQn
118118
#define USART3_IRQHandler USART3_4_LPUART1_IRQHandler
119-
#elif defined(STM32G0B0xx)
119+
#elif defined(USART5_BASE)
120120
#define USART3_IRQn USART3_4_5_6_IRQn
121121
#define USART3_IRQHandler USART3_4_5_6_IRQHandler
122122
#else
@@ -143,9 +143,8 @@ struct serial_s {
143143
#define USART4_IRQn USART3_4_5_6_LPUART1_IRQn
144144
#elif defined(LPUART1_BASE)
145145
#define USART4_IRQn USART3_4_LPUART1_IRQn
146-
#elif defined(STM32G0B0xx)
146+
#elif defined(USART5_BASE)
147147
#define USART4_IRQn USART3_4_5_6_IRQn
148-
#define USART4_IRQHandler USART3_4_5_6_IRQHandler
149148
#else
150149
#define USART4_IRQn USART3_4_IRQn
151150
#endif
@@ -163,9 +162,8 @@ struct serial_s {
163162
#elif defined(STM32G0xx)
164163
#if defined(LPUART2_BASE)
165164
#define USART5_IRQn USART3_4_5_6_LPUART1_IRQn
166-
#elif defined(STM32G0B0xx)
165+
#elif defined(USART5_BASE)
167166
#define USART5_IRQn USART3_4_5_6_IRQn
168-
#define USART5_IRQHandler USART3_4_5_6_IRQHandler
169167
#endif
170168
#elif defined(STM32L0xx)
171169
#define USART5_IRQn USART4_5_IRQn
@@ -183,9 +181,8 @@ struct serial_s {
183181
#elif defined(STM32G0xx)
184182
#if defined(LPUART2_BASE)
185183
#define USART6_IRQn USART3_4_5_6_LPUART1_IRQn
186-
#elif defined(STM32G0B0xx)
184+
#elif defined(USART5_BASE)
187185
#define USART6_IRQn USART3_4_5_6_IRQn
188-
#define USART6_IRQHandler USART3_4_5_6_IRQHandler
189186
#endif
190187
#endif /* STM32F0xx */
191188
#endif

libraries/SrcWrapper/src/stm32/uart.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1024,7 +1024,7 @@ void USART3_IRQHandler(void)
10241024
if (uart_handlers[UART4_INDEX] != NULL) {
10251025
HAL_UART_IRQHandler(uart_handlers[UART4_INDEX]);
10261026
}
1027-
#if defined(STM32F030xC) || defined(STM32G0xx) && (defined(LPUART2_BASE) || defined(STM32G0B0xx))
1027+
#if defined(STM32F030xC) || defined(STM32G0xx) && (defined(LPUART2_BASE) || defined(USART5_BASE))
10281028
if (uart_handlers[UART5_INDEX] != NULL) {
10291029
HAL_UART_IRQHandler(uart_handlers[UART5_INDEX]);
10301030
}
@@ -1093,7 +1093,7 @@ void UART5_IRQHandler(void)
10931093
* @param None
10941094
* @retval None
10951095
*/
1096-
#if defined(USART6_BASE) && !defined(STM32F0xx) && !defined(STM32G0B0xx)
1096+
#if defined(USART6_BASE) && !defined(STM32F0xx) && !defined(STM32G0xx)
10971097
void USART6_IRQHandler(void)
10981098
{
10991099
HAL_NVIC_ClearPendingIRQ(USART6_IRQn);

0 commit comments

Comments
 (0)