1.1.13.18 1.8.24.8 1.10.23.10 1.11.23.10 1.12.24.10 1.13.22.10 1.14.17.10 1.15.18.10 1.16.25.10 1.17.20.10 1.18.21.10 1.19.21.10 1.20.25.10 1.21.26.10 1.22.28.10 1.23.27.10 1.24.23.10 1.27.26.8 1.34.26.8 1.35.20.8 UARTx_WriteBufferSizeGet Function

C

/* x = UART instance number */

/* Ring buffer mode */
size_t UARTx_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

UARTx_Initialize must have been called for the associated UART 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 = UART1_WriteBufferSizeGet();

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

Remarks

None