8000 mimxrt: Set the uart ioctl write poll flag properly. · micropython/micropython@d188f17 · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit d188f17

Browse files
committed
mimxrt: 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.
1 parent 60f5c27 commit d188f17

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ports/mimxrt/machine_uart.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numb 6A9A erDiff line change
@@ -425,7 +425,7 @@ STATIC mp_uint_t machine_uart_ioctl(mp_obj_t self_in, mp_uint_t request, mp_uint
425425
ret |= MP_STREAM_POLL_RD;
426426
}
427427
}
428-
if ((flags & MP_STREAM_POLL_WR)) {
428+
if ((flags & MP_STREAM_POLL_WR) && (self->tx_status == kStatus_LPUART_TxIdle)) {
429429
ret |= MP_STREAM_POLL_WR;
430430
}
431431
} else {

0 commit comments

Comments
 (0)
0