WebbotLib AVR library
WebbotLib It just does it
  C++ documentation  C documentation

isBusy

Returns FALSE if the UART has nothing left to send.
If your main loop is continually sending data over the UART, even if you have a transmit buffer, then the buffer can quickly become full since the UART is running slower than your program. Further transmissions will cause your program to halt until there is space left in the transmit buffer.
Sometimes this is not what you want to do - perhaps you want your program to go at full speed and only send data when it's not going to slow down the program.
That's when you need this function
Syntax
Uart. isBusy()
 
Parameters
None
Returns
boolean
Example
if( ! uart0.isBusy() ){
    // UART has nothing to do
    // so send your stuff out now
    uart0 << "Hello World\n");
}
Obviously if the UART has no transmit buffer and you are sending more than 1 byte, or the message length is longer than your transmit buffer size, then there will still be a pause whilst sending the message.

 

 

Valid XHTML 1.0 Transitional