1.2.21.17 1.3.25.17 1.4.21.17 1.5.25.17 1.6.22.17 1.7.23.17 1.9.19.17 1.29.23.17 1.30.18.17 1.31.18.17 1.32.26.17 1.33.16.17 1.37.18.17 1.38.21.17 1.39.18.17 1.40.20.17 SERCOMx_USART_ReadFreeBufferCountGet Function
C
/* x = SERCOM instance number */
/* Ring buffer mode */
size_t SERCOMx_USART_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 read before the receive buffer becomes full.
Precondition
SERCOMx_USART_Initialize must have been called for the associated SERCOM_USART 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 = SERCOM0_USART_ReadFreeBufferCountGet();
Remarks
None