1.25.5.4 DBGU_WriteFreeBufferCountGet Function

C

/* Ring buffer mode */
size_t DBGU_WriteFreeBufferCountGet(void)

Summary

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

Description

This function returns the number of bytes of free space available in the internal transmit buffer

Precondition

DBGU_Initialize must have been called for the associated DBGU instance.

Parameters

None

Returns

The API returns the number of bytes of free space in the transmit buffer.

Example

uint8_t txBuffer[10];

// Check if there is space for writing at-least 10 characters to the transmit buffer
if (DBGU_WriteFreeBufferCountGet() >= 10)
{
    DBGU_Write((uint8_t*)txBuffer, 10);
}

Remarks

None