mimxrt/machine_uart: Set the UART ioctl write poll flag properly.
It was always set to True. The change adds a check to the tx status flag which is set when all data is transferred.
This commit is contained in:
parent
0f048a5a2a
commit
443fbcf81c
@ -437,7 +437,7 @@ STATIC mp_uint_t machine_uart_ioctl(mp_obj_t self_in, mp_uint_t request, mp_uint
|
||||
ret |= MP_STREAM_POLL_RD;
|
||||
}
|
||||
}
|
||||
if ((flags & MP_STREAM_POLL_WR)) {
|
||||
if ((flags & MP_STREAM_POLL_WR) && (self->tx_status == kStatus_LPUART_TxIdle)) {
|
||||
ret |= MP_STREAM_POLL_WR;
|
||||
}
|
||||
} else if (request == MP_STREAM_FLUSH) {
|
||||
|
Loading…
Reference in New Issue
Block a user