Quote:
The standard 16550 UART has a TE status bit which means transmit FIFO is empty. Not sure how you could get it from user space. I don't think the hardware provides any indication of the number of bytes in the FIFO, and due to flow control there is no way to predict how long it could take to empty.
|
I think you're right. This is a Raspberry Pi 4, and
the peripheral documentation (page 15) states that this uart (a "mini-uart" with some 16550-like attributes) has a register (AUX_MU_STAT_REG) that "provides a lot of useful information about the internal status of the mini UART not found on a normal 16550 UART."
In particular, one bit of this register indicates that "the transmitter is idle and the transmit FIFO is empty."
So, I think you're right that the data is available, and you're also right that getting to it from user-space might not be easy. I will look into it further, but please let me know if you have any other guidance.
Thanks!