1.1.13.21 1.8.24.16 1.10.23.18 1.11.23.18 1.12.24.18 1.13.22.18 1.14.17.18 1.15.18.18 1.16.25.18 1.17.20.18 1.18.21.18 1.19.21.18 1.20.25.18 1.21.26.18 1.22.28.18 1.23.27.18 1.24.23.18 1.27.26.16 1.34.26.16 1.35.20.16 UARTx_ReadFreeBufferCountGet Function

C

/* x = UART instance number */

/* Ring buffer mode */

size_t UARTx_ReadFreeBufferCountGet(void)

Summary

Returns the number of bytes of free space available in the internal receive buffer

Description

This API returns the number of bytes of free space available in the internal receive buffer. This API can be used to determine how many bytes can be received before the receive buffer becomes full.

Precondition

UARTx_Initialize must have been called for the associated UART instance.

Parameters

None

Returns

The API returns the number of bytes of free space in the receive buffer. If 9-bit mode is enabled, then the return value indicates number of 9-bit data that can be copied into the internal receive buffer.

Example

size_t nRxFreeSpace;

nRxFreeSpace = UART1_ReadFreeBufferCountGet();

Remarks

None