diff options
Diffstat (limited to 'src/stm32/stm32f0_serial.c')
-rw-r--r-- | src/stm32/stm32f0_serial.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/stm32/stm32f0_serial.c b/src/stm32/stm32f0_serial.c index bb4ec69a..4e0f39fe 100644 --- a/src/stm32/stm32f0_serial.c +++ b/src/stm32/stm32f0_serial.c @@ -87,8 +87,10 @@ #endif #if CONFIG_MACH_STM32G0 - // The stm32g0 has slightly different register names - #define USART2_IRQn USART2_LPUART2_IRQn + // Some of the stm32g0 MCUs have slightly different register names + #ifdef LPUART2 + #define USART2_IRQn USART2_LPUART2_IRQn + #endif #define USART_CR1_RXNEIE USART_CR1_RXNEIE_RXFNEIE #define USART_CR1_TXEIE USART_CR1_TXEIE_TXFNFIE #define USART_ISR_RXNE USART_ISR_RXNE_RXFNE |