1.8.7.8 1.25.6.8 1.26.5.8 1.27.5.8 1.28.6.8 1.36.7.8 1.41.5.8 1.42.3.8 FLEXCOMx_USART_WriteBufferSizeGet Function

C

/* x = FLEXCOM instance number */

/* Ring buffer mode */

size_t FLEXCOMx_USART_WriteBufferSizeGet(void)

Summary

Returns the size of the internal transmit ring buffer

Description

This function returns the size of the transmit ring buffer, which is same as the size of the transmit ring buffer configured in MHC.

Precondition

FLEXCOMx_USART_Initialize must have been called for the associated FLEXCOM_USART instance.

Parameters

None

Returns

The API returns the size of the transmit ring buffer. If 9-bit mode is enabled, then the return value indicates the number of 9-bit data that can be copied to the internal transmit ring buffer.

Example

size_t txBufferSize;

txBufferSize = FLEXCOM0_USART_WriteBufferSizeGet();

// Set a threshold to get notification when the transmit ring buffer is empty
FLEXCOM0_USART_WriteThresholdSet(txBufferSize);

Remarks

None