Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5cd6cbb

Browse files
committed
[G0] Fix Timer and USART IRQ definition
Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
1 parentd89c283 commit5cd6cbb

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

‎cores/arduino/stm32/timer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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
#defineTIM7_IRQn TIM7_LPTIM2_IRQn
8080
#defineTIM7_IRQHandler TIM7_LPTIM2_IRQHandler
8181
#elif defined(STM32G4xx)

‎cores/arduino/stm32/uart.h

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff 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
#defineUSART3_IRQn USART3_4_LPUART1_IRQn
104105
#defineUSART3_IRQHandler USART3_4_LPUART1_IRQHandler
106+
#else
107+
#defineUSART3_IRQn USART3_4_IRQn
108+
#defineUSART3_IRQHandler USART3_4_IRQHandler
109+
#endif
105110
#endif/* STM32G0xx */
106111
#endif
107112

@@ -118,8 +123,12 @@ struct serial_s {
118123
#elif defined(STM32L0xx)
119124
#defineUSART4_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
#defineUSART4_IRQn USART3_4_LPUART1_IRQn
129+
#else
130+
#defineUSART4_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
#defineLPUART1_IRQn USART3_4_LPUART1_IRQn
166-
#endif
167175
#endif/* STM32G0xx */
176+
#endif
177+
168178

169179
/* Exported macro ------------------------------------------------------------*/
170180
/* Exported functions ------------------------------------------------------- */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp