@@ -100,7 +100,7 @@ struct serial_s {
100
100
#endif
101
101
102
102
#if defined(USART2_BASE ) && !defined(USART2_IRQn )
103
- #if defined(STM32G0xx )
103
+ #if defined(STM32G0xx ) || defined( STM32U0xx )
104
104
#if defined(LPUART2_BASE )
105
105
#define USART2_IRQn USART2_LPUART2_IRQn
106
106
#define USART2_IRQHandler USART2_LPUART2_IRQHandler
@@ -134,6 +134,9 @@ struct serial_s {
134
134
#define USART3_IRQn USART3_4_IRQn
135
135
#define USART3_IRQHandler USART3_4_IRQHandler
136
136
#endif
137
+ #elif defined(STM32U0xx )
138
+ #define USART3_IRQn USART3_LPUART1_IRQn
139
+ #define USART3_IRQHandler USART3_LPUART1_IRQHandler
137
140
#endif /* STM32F0xx */
138
141
#endif
139
142
@@ -159,6 +162,11 @@ struct serial_s {
159
162
#else
160
163
#define USART4_IRQn USART3_4_IRQn
161
164
#endif
165
+ #elif defined(STM32U0xx )
166
+ #if defined(LPUART3_BASE )
167
+ #define USART4_IRQn USART4_LPUART3_IRQn
168
+ #define USART4_IRQHandler USART4_LPUART3_IRQHandler
169
+ #endif /* LPUART3_BASE */
162
170
#endif /* STM32G0xx */
163
171
#endif
164
172
@@ -222,6 +230,9 @@ struct serial_s {
222
230
#define LPUART1_IRQn USART3_4_LPUART1_IRQn
223
231
#endif
224
232
#endif /* STM32G0xx */
233
+ #if defined(STM32U0xx )
234
+ #define LPUART1_IRQn USART3_LPUART1_IRQn
235
+ #endif /* STM32U0xx */
225
236
#endif
226
237
227
238
#if defined(LPUART2_BASE ) && !defined(LPUART2_IRQn )
@@ -230,6 +241,9 @@ struct serial_s {
230
241
#define LPUART2_IRQn USART2_LPUART2_IRQn
231
242
#endif
232
243
#endif /* STM32G0xx */
244
+ #if defined(STM32U0xx )
245
+ #define LPUART2_IRQn USART2_LPUART2_IRQn
246
+ #endif /* STM32U0xx */
233
247
#endif
234
248
235
249
/* Exported macro ------------------------------------------------------------*/
0 commit comments