Skip to content

Commit f004f09

Browse files
committed
Consistency fixes for multiple UART support commit
1 parent 8f9b115 commit f004f09

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

targets/TARGET_STM/TARGET_STM32G0/serial_device.c

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -91,32 +91,32 @@ static void uart1_irq(void)
9191
#if defined (USART_GROUP1_IRQn)
9292
static void uart_group1_irq(void)
9393
{
94-
#if defined(USART2_BASE)
94+
#if defined(USART2_BASE)
9595
uart_irq(UART_2);
96-
#endif
97-
#if defined(LPUART2_BASE)
96+
#endif
97+
#if defined(LPUART2_BASE)
9898
uart_irq(LPUART_2);
99-
#endif
99+
#endif
100100
}
101101

102102
#if defined(USART_GROUP2_IRQn)
103103
static void uart_group2_irq(void)
104104
{
105-
#if defined(USART3_BASE)
105+
#if defined(USART3_BASE)
106106
uart_irq(UART_3);
107-
#endif
108-
#if defined(USART4_BASE)
107+
#endif
108+
#if defined(USART4_BASE)
109109
uart_irq(UART_4);
110-
#endif
111-
#if defined(USART5_BASE)
110+
#endif
111+
#if defined(USART5_BASE)
112112
uart_irq(UART_5);
113-
#endif
114-
#if defined(USART6_BASE)
113+
#endif
114+
#if defined(USART6_BASE)
115115
uart_irq(UART_6);
116-
#endif
117-
#if defined(LPUART1_BASE)
116+
#endif
117+
#if defined(LPUART1_BASE)
118118
uart_irq(LPUART_1);
119-
#endif
119+
#endif
120120
}
121121
#endif
122122

@@ -186,7 +186,7 @@ void serial_irq_set(serial_t *obj, SerialIrq irq, uint32_t enable)
186186

187187
#if defined(LPUART2_BASE)
188188
if (obj_s->uart == LPUART_2) {
189-
irq_n = USART2_LPUART2_IRQn;
189+
irq_n = USART_GROUP1_IRQn;
190190
vector = (uint32_t)&uart_group1_irq;
191191
}
192192
#endif

targets/TARGET_STM/TARGET_STM32L0/serial_device.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,12 +82,12 @@ static void uart2_irq(void)
8282
#if defined(USART4_BASE) || defined(USART5_BASE)
8383
static void uart4_5_irq(void)
8484
{
85-
#if defined(USART4_BASE)
85+
#if defined(USART4_BASE)
8686
uart_irq(UART_4);
87-
#endif
88-
#if defined(USART4_BASE)
87+
#endif
88+
#if defined(USART4_BASE)
8989
uart_irq(UART_5);
90-
#endif
90+
#endif
9191
}
9292
#endif
9393

0 commit comments

Comments
 (0)