Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STM32WL: UART2 was missing #15134

Merged
merged 1 commit into from
Oct 11, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions targets/TARGET_STM/TARGET_STM32WL/serial_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@ static void uart1_irq(void)
}
#endif

#if defined(USART2_BASE)
static void uart2_irq(void)
{
uart_irq(UART_2);
}
#endif

#if defined(LPUART1_BASE)
static void lpuart1_irq(void)
{
Expand Down Expand Up @@ -94,6 +101,12 @@ void serial_irq_set(serial_t *obj, SerialIrq irq, uint32_t enable)
vector = (uint32_t)&uart1_irq;
break;
#endif
#if defined(USART2_BASE)
case UART_2:
irq_n = USART2_IRQn;
vector = (uint32_t)&uart2_irq;
break;
#endif
#if defined(LPUART1_BASE)
case LPUART_1:
irq_n = LPUART1_IRQn;
Expand Down Expand Up @@ -272,6 +285,11 @@ static IRQn_Type serial_get_irq_n(UARTName uart_name)
irq_n = USART1_IRQn;
break;
#endif
#if defined(USART2_BASE)
case UART_2:
irq_n = USART2_IRQn;
break;
#endif
#if defined(LPUART1_BASE)
case LPUART_1:
irq_n = LPUART1_IRQn;
Expand Down