serial: uart_native_tty: Polling thread fix
Addresses an issue where attempts to transmit data fail. The identified cause of this failure is the handling of the `rx_irq_enable` and `tx_irq_enable` flags. The `else if` handling the `tx_irq_enable` was replaced by an `if` so both flags can be true, and both functions can be called. This fix was tested with the `cellular_modem` example successfully. Signed-off-by: Fabian Kainka <kainka@cognid.de>
This commit is contained in:
parent
a1893c5890
commit
24c03bfacb
|
@ -289,9 +289,11 @@ void native_tty_uart_irq_function(void *arg1, void *arg2, void *arg3)
|
|||
} else {
|
||||
k_sleep(K_MSEC(1));
|
||||
}
|
||||
} else if (data->tx_irq_enabled) {
|
||||
}
|
||||
if (data->tx_irq_enabled) {
|
||||
native_tty_uart_irq_handler(dev);
|
||||
} else {
|
||||
}
|
||||
if (data->tx_irq_enabled == false && data->rx_irq_enabled == false) {
|
||||
k_sleep(K_MSEC(10));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue