Skip to content

Commit 46bbfbd

Browse files
authored
Merge pull request #15134 from jeromecoutant/PR_UART_WL
STM32WL: UART2 was missing
2 parents 76c3720 + 4c5093c commit 46bbfbd

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

targets/TARGET_STM/TARGET_STM32WL/serial_device.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,13 @@ static void uart1_irq(void)
6565
}
6666
#endif
6767

68+
#if defined(USART2_BASE)
69+
static void uart2_irq(void)
70+
{
71+
uart_irq(UART_2);
72+
}
73+
#endif
74+
6875
#if defined(LPUART1_BASE)
6976
static void lpuart1_irq(void)
7077
{
@@ -94,6 +101,12 @@ void serial_irq_set(serial_t *obj, SerialIrq irq, uint32_t enable)
94101
vector = (uint32_t)&uart1_irq;
95102
break;
96103
#endif
104+
#if defined(USART2_BASE)
105+
case UART_2:
106+
irq_n = USART2_IRQn;
107+
vector = (uint32_t)&uart2_irq;
108+
break;
109+
#endif
97110
#if defined(LPUART1_BASE)
98111
case LPUART_1:
99112
irq_n = LPUART1_IRQn;
@@ -272,6 +285,11 @@ static IRQn_Type serial_get_irq_n(UARTName uart_name)
272285
irq_n = USART1_IRQn;
273286
break;
274287
#endif
288+
#if defined(USART2_BASE)
289+
case UART_2:
290+
irq_n = USART2_IRQn;
291+
break;
292+
#endif
275293
#if defined(LPUART1_BASE)
276294
case LPUART_1:
277295
irq_n = LPUART1_IRQn;

0 commit comments

Comments
 (0)