Serial - is there a standard way to determine if the transnmit buffer is full ?

I have seen people asking this question already, but I cannot find a “standard” resolution, thus a call already existing in the standard distribution ?

The call is fairly important as the application, which wants to send data to the serial port, has no way of knowing if the call to the Serial.write() would block or not ? For real-time performance it is very important to know this ?

Thank you, Pawel.

PawelJalocha:
I have seen people asking this question already, but I cannot find a “standard” resolution, thus a call already existing in the standard distribution ?

The call is fairly important as the application, which wants to send data to the serial port, has no way of knowing if the call to the Serial.write() would block or not ? For real-time performance it is very important to know this ?

Thank you, Pawel.

Serial.availableForWrite()

PawelJalocha:
I have seen people asking this question already, but I cannot find a "standard" resolution, thus a call already existing in the standard distribution ?

The call is fairly important as the application, which wants to send data to the serial port, has no way of knowing if the call to the Serial.write() would block or not ? For real-time performance it is very important to know this ?

Thank you, Pawel.

Did you read the reference page on serial?

Well, must have been reading the wrong one, as I can see now there is a call availableForWrite() - so the issue is solved ! Sorry for the extra traffic !