Skip to content

Commit ece3e08

Browse files
committed
simplify IRQn handler mapping
1 parent bf77190 commit ece3e08

File tree

1 file changed

+2
-8
lines changed
  • libraries/SrcWrapper/inc

1 file changed

+2
-8
lines changed

libraries/SrcWrapper/inc/uart.h

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ struct serial_s {
121121
#define USART3_IRQn USART3_4_IRQn
122122
#define USART3_IRQHandler USART3_4_IRQHandler
123123
#endif /* STM32F091xC || STM32F098xx */
124-
#elif defined(STM32G0xx)
124+
#elif defined(STM32G0xx) || defined(STM32C0xx)
125125
#if defined(LPUART2_BASE)
126126
#define USART3_IRQn USART3_4_5_6_LPUART1_IRQn
127127
#define USART3_IRQHandler USART3_4_5_6_LPUART1_IRQHandler
@@ -138,9 +138,6 @@ struct serial_s {
138138
#elif defined(STM32U0xx)
139139
#define USART3_IRQn USART3_LPUART1_IRQn
140140
#define USART3_IRQHandler USART3_LPUART1_IRQHandler
141-
#elif defined(STM32C0xx)
142-
#define USART3_IRQn USART3_4_IRQn
143-
#define USART3_IRQHandler USART3_4_IRQHandler
144141
#endif /* STM32F0xx */
145142
#endif
146143

@@ -156,7 +153,7 @@ struct serial_s {
156153
#endif /* STM32F091xC || STM32F098xx */
157154
#elif defined(STM32L0xx)
158155
#define USART4_IRQn USART4_5_IRQn
159-
#elif defined(STM32G0xx)
156+
#elif defined(STM32G0xx) || defined(STM32C0xx)
160157
#if defined(LPUART2_BASE)
161158
#define USART4_IRQn USART3_4_5_6_LPUART1_IRQn
162159
#elif defined(LPUART1_BASE)
@@ -171,9 +168,6 @@ struct serial_s {
171168
#define USART4_IRQn USART4_LPUART3_IRQn
172169
#define USART4_IRQHandler USART4_LPUART3_IRQHandler
173170
#endif /* LPUART3_BASE */
174-
#elif defined(STM32C0xx)
175-
#define USART4_IRQn USART3_4_IRQn
176-
#define USART4_IRQHandler USART3_4_IRQHandler
177171
#endif /* STM32G0xx */
178172
#endif
179173

0 commit comments

Comments
 (0)