.txfree R/O Property


For the selected serial port (selection is made through ser.num), returns the amount of free space in the TX buffer in bytes.


Word | dword

Value Range:


See Also:

Buffer Memory Status


Note that the amount of free space returned by this property does not take into account any uncommitted data that might reside in the buffer (this can be checked via ser.newtxlen). Therefore, actual free space in the buffer is ser.txfree - ser.newtxlen. Your application will not be able to store more data than this amount.

To achieve asynchronous data processing, use the ser.notifysent method to get on_ser_data_sent event once the TX buffer gains the required amount of free space.

Older devices had smaller RAM sizes, so the value returned by this property was of the word type. On newer devices with larger RAM capacities, this property has the dword type. Inspect the property's declaration on the platform you are using to make sure you know its type.

.txfree R/O Property