1.1.13.9 1.8.24.10 1.10.23.12 1.11.23.12 1.12.24.12 1.13.22.12 1.14.17.12 1.15.18.12 1.16.25.12 1.17.20.12 1.18.21.12 1.19.21.12 1.20.25.12 1.21.26.12 1.22.28.12 1.23.27.12 1.24.23.12 1.27.26.10 1.34.26.10 1.35.20.10 UARTx_TransmitterIsReady Function
C
/* x = UART instance number */
/* Blocking mode */
bool UARTx_TransmitterIsReady( void )
Summary
Returns the hardware status of the UART Transmitter
Description
This function returns the hardware status associated with the transmit hardware FIFO of the given UART peripheral instance. When the transmitter is ready, user can submit data to be transmitted. This function is available only in blocking (non-interrupt) mode of operation. It can be used to achieve non-blocking behavior of write request in the non-interrupt mode. If non-blocking behavior is desired, this function should be called to check if the transmitter is ready and then the UARTx_Write() function should be called with a buffer size of 1.
Precondition
UARTx_Initialize must have been called for the associated UART instance.
Parameters
None.
Returns
true - if transmit hardware FIFO has empty space to accept data.
false - if transmit hardware FIFO is full.
Example
if(true == UART1_TransmitterIsReady()) { // Empty space is available in Transmitter FIFO, hence can write a byte UART1_Write("A", 1); } else { //Transmitter is busy }
Remarks
None