mirror of https://github.com/ARMmbed/mbed-os.git
KL27Z: Fix serial IRQ handling
Check that the RX or TX interrupt is enabled before calling a registered handler with RxIrq or TxIrq arg.pull/10774/head
parent
9efaabe404
commit
3119d69f0e
|
@ -135,10 +135,10 @@ static inline void uart_irq(uint32_t transmit_empty, uint32_t receive_full, uint
|
|||
}
|
||||
|
||||
if (serial_irq_ids[index] != 0) {
|
||||
if (transmit_empty)
|
||||
if (transmit_empty && (LPUART_GetEnabledInterrupts(uart_addrs[index]) & kLPUART_TxDataRegEmptyInterruptEnable))
|
||||
irq_handler(serial_irq_ids[index], TxIrq);
|
||||
|
||||
if (receive_full)
|
||||
if (receive_full && (LPUART_GetEnabledInterrupts(uart_addrs[index]) & kLPUART_RxDataRegFullInterruptEnable))
|
||||
irq_handler(serial_irq_ids[index], RxIrq);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue