Skip to content

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 numberDiff 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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy