File tree 2 files changed +15
-5
lines changed
2 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ extern "C" {
75
75
#endif
76
76
#endif
77
77
#if defined(TIM7_BASE ) && !defined(TIM7_IRQn )
78
- #if defined(STM32G0xx )
78
+ #if defined(STM32G0xx ) && defined( LPTIM2_BASE )
79
79
#define TIM7_IRQn TIM7_LPTIM2_IRQn
80
80
#define TIM7_IRQHandler TIM7_LPTIM2_IRQHandler
81
81
#elif defined(STM32G4xx )
Original file line number Diff line number Diff line change @@ -99,9 +99,14 @@ struct serial_s {
99
99
#endif /* STM32F091xC || STM32F098xx */
100
100
#endif /* STM32F0xx */
101
101
102
- #if defined(STM32G0xx ) && !defined(STM32G030xx ) && !defined(STM32G031xx ) && !defined(STM32G041xx )
102
+ #if defined(STM32G0xx )
103
+ #if defined(LPUART1_BASE )
103
104
#define USART3_IRQn USART3_4_LPUART1_IRQn
104
105
#define USART3_IRQHandler USART3_4_LPUART1_IRQHandler
106
+ #else
107
+ #define USART3_IRQn USART3_4_IRQn
108
+ #define USART3_IRQHandler USART3_4_IRQHandler
109
+ #endif
105
110
#endif /* STM32G0xx */
106
111
#endif
107
112
@@ -118,8 +123,12 @@ struct serial_s {
118
123
#elif defined(STM32L0xx )
119
124
#define USART4_IRQn USART4_5_IRQn
120
125
#endif /* STM32F0xx */
121
- #if defined(STM32G0xx ) && !defined(STM32G030xx ) && !defined(STM32G031xx ) && !defined(STM32G041xx )
126
+ #if defined(STM32G0xx )
127
+ #if defined(LPUART1_BASE )
122
128
#define USART4_IRQn USART3_4_LPUART1_IRQn
129
+ #else
130
+ #define USART4_IRQn USART3_4_IRQn
131
+ #endif
123
132
#endif /* STM32G0xx */
124
133
125
134
#endif
@@ -160,11 +169,12 @@ struct serial_s {
160
169
#endif
161
170
#endif /* STM32F0xx */
162
171
163
- #if defined(STM32G0xx ) && !defined(STM32G030xx ) && !defined(STM32G031xx ) && !defined(STM32G041xx )
164
172
#if defined(LPUART1_BASE ) && !defined(LPUART1_IRQn )
173
+ #if defined(STM32G0xx ) && defined(USART3_BASE )
165
174
#define LPUART1_IRQn USART3_4_LPUART1_IRQn
166
- #endif
167
175
#endif /* STM32G0xx */
176
+ #endif
177
+
168
178
169
179
/* Exported macro ------------------------------------------------------------*/
170
180
/* Exported functions ------------------------------------------------------- */
You can’t perform that action at this time.
0 commit comments