From e33b41abaabe7d2be2207c79d5ed59cb8ce7babc Mon Sep 17 00:00:00 2001 From: Alex Voinea Date: Mon, 12 Dec 2022 22:14:09 +0100 Subject: stm32g0: add stm32g0b0 support Signed-off-by: Alex Voinea --- src/stm32/stm32f0_serial.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/stm32/stm32f0_serial.c') 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 -- cgit v1.2.3-70-g09d2