Skip to content

Commit 09ea361

Browse files
authored
Merge pull request #10790 from jeromecoutant/PR_H7_LPUART
STM32H7 enable LPUART
2 parents 94d2a42 + a90e68e commit 09ea361

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

targets/TARGET_STM/TARGET_STM32H7/serial_device.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,13 @@ static void uart8_irq(void)
128128
}
129129
#endif
130130

131+
#if defined(LPUART1_BASE)
132+
static void lpuart1_irq(void)
133+
{
134+
uart_irq(LPUART_1);
135+
}
136+
#endif
137+
131138
void serial_irq_handler(serial_t *obj, uart_irq_handler handler, uint32_t id)
132139
{
133140
struct serial_s *obj_s = SERIAL_S(obj);
@@ -191,6 +198,12 @@ void serial_irq_set(serial_t *obj, SerialIrq irq, uint32_t enable)
191198
irq_n = UART8_IRQn;
192199
vector = (uint32_t)&uart8_irq;
193200
break;
201+
#endif
202+
#if defined(LPUART1_BASE)
203+
case LPUART_1:
204+
irq_n = LPUART1_IRQn;
205+
vector = (uint32_t)&lpuart1_irq;
206+
break;
194207
#endif
195208
}
196209

0 commit comments

Comments
 (0)