File tree Expand file tree Collapse file tree 2 files changed +15
-5
lines changed Expand file tree Collapse file tree 2 files changed +15
-5
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ extern "C" {
7575#endif
7676#endif
7777#if defined(TIM7_BASE ) && !defined(TIM7_IRQn )
78- #if defined(STM32G0xx )
78+ #if defined(STM32G0xx ) && defined( LPTIM2_BASE )
7979#define TIM7_IRQn TIM7_LPTIM2_IRQn
8080#define TIM7_IRQHandler TIM7_LPTIM2_IRQHandler
8181#elif defined(STM32G4xx )
Original file line number Diff line number Diff line change @@ -99,9 +99,14 @@ struct serial_s {
9999#endif /* STM32F091xC || STM32F098xx */
100100#endif /* STM32F0xx */
101101
102- #if defined(STM32G0xx ) && !defined(STM32G030xx ) && !defined(STM32G031xx ) && !defined(STM32G041xx )
102+ #if defined(STM32G0xx )
103+ #if defined(LPUART1_BASE )
103104#define USART3_IRQn USART3_4_LPUART1_IRQn
104105#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
105110#endif /* STM32G0xx */
106111#endif
107112
@@ -118,8 +123,12 @@ struct serial_s {
118123#elif defined(STM32L0xx )
119124#define USART4_IRQn USART4_5_IRQn
120125#endif /* STM32F0xx */
121- #if defined(STM32G0xx ) && !defined(STM32G030xx ) && !defined(STM32G031xx ) && !defined(STM32G041xx )
126+ #if defined(STM32G0xx )
127+ #if defined(LPUART1_BASE )
122128#define USART4_IRQn USART3_4_LPUART1_IRQn
129+ #else
130+ #define USART4_IRQn USART3_4_IRQn
131+ #endif
123132#endif /* STM32G0xx */
124133
125134#endif
@@ -160,11 +169,12 @@ struct serial_s {
160169#endif
161170#endif /* STM32F0xx */
162171
163- #if defined(STM32G0xx ) && !defined(STM32G030xx ) && !defined(STM32G031xx ) && !defined(STM32G041xx )
164172#if defined(LPUART1_BASE ) && !defined(LPUART1_IRQn )
173+ #if defined(STM32G0xx ) && defined(USART3_BASE )
165174#define LPUART1_IRQn USART3_4_LPUART1_IRQn
166- #endif
167175#endif /* STM32G0xx */
176+ #endif
177+
168178
169179/* Exported macro ------------------------------------------------------------*/
170180/* Exported functions ------------------------------------------------------- */
You can’t perform that action at this time.
0 commit comments