1.2.4.4.8 SYS_CONSOLE_Flush Function

C

bool SYS_CONSOLE_Flush(const SYS_CONSOLE_HANDLE handle)

Summary

Flushes the read and write queues for the given console instance.

Description

This function flushes the read and write buffers. Any on-going transfers will not be flushed.

Preconditions

The SYS_CONSOLE_Initialize function should have been called before calling this function.

Parameters

ParamDescription
handleHandle to the console instance

Returns

true - If the operation is successful

false - In case of failure

Example

SYS_CONSOLE_HANDLE myConsoleHandle;
bool status;

// myConsoleHandle is assumed to be a valid console handle

status = SYS_CONSOLE_Flush(myConsoleHandle);
if (status == false)
{
    // Handle error
}

Remarks

This API may do nothing and return true, where the read and write are not buffered.