1.2.4.4.8 SYS_CONSOLE_Flush Function

1.2.4.4.8 C

bool SYS_CONSOLE_Flush(const SYS_CONSOLE_HANDLE handle)

1.2.4.4.8 Summary

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

1.2.4.4.8 Description

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

1.2.4.4.8 Preconditions

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

1.2.4.4.8 Parameters

ParametersDescription
handleHandle to the console instance

1.2.4.4.8 Returns

True - If the operation is successful.

False - In case of failure.

1.2.4.4.8 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
}

1.2.4.4.8 Remarks

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