1.26.4.10 DBGU_TransmitterIsReady Function
C
/* Blocking mode */
bool DBGU_TransmitterIsReady( void )
Summary
Returns the hardware status of the DBGU Transmitter
Description
This function returns the hardware status associated with the transmit hardware FIFO of the given DBGU 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 DBGU_Write() function should be called with a buffer size of 1.
Precondition
DBGU_Initialize must have been called for the associated DBGU 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 == DBGU_TransmitterIsReady()) { // Empty space is available in Transmitter FIFO, hence can write a byte DBGU_Write("A", 1); } else { //Transmitter is busy }
Remarks
None