drivers: serial: b91: irq_tx_ready update to check TX IRQ
Updated b91_irq_tx_ready API to check TX IRQ enabled. Signed-off-by: Yuriy Vynnychek <yura.vynnychek@telink-semi.com>
This commit is contained in:
parent
1c8af8cfe5
commit
1242f5129d
1 changed files with 2 additions and 1 deletions
|
@ -427,7 +427,8 @@ static int uart_b91_irq_tx_ready(const struct device *dev)
|
||||||
{
|
{
|
||||||
volatile struct uart_b91_t *uart = GET_UART(dev);
|
volatile struct uart_b91_t *uart = GET_UART(dev);
|
||||||
|
|
||||||
return (uart_b91_get_tx_bufcnt(uart) < UART_TX_BUF_CNT) ? 1 : 0;
|
return ((uart_b91_get_tx_bufcnt(uart) < UART_TX_BUF_CNT) &&
|
||||||
|
((uart->ctrl0 & UART_TX_IRQ_MASK) != 0)) ? 1 : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* API implementation: irq_tx_complete */
|
/* API implementation: irq_tx_complete */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue