SIO_flush
2-394
C Interface
Syntax
status = SIO_flush(stream);
Parameters
SIO_Handle stream;
/* stream handle */
Return Value
Int
status;
/* result of operation */
Description
SIO_flush causes all pending data to be discarded regardless of the
mode of the stream. SIO_flush differs from SIO_idle in that SIO_flush
never suspends program execution to complete processing of data, even
for a stream created in output mode.
The underlying device connected to stream is idled as a result of calling
SIO_flush. In general, the interrupt is disabled for the device.
One of the purposes of this function is to provide synchronization with the
external environment.
SIO_flush returns SYS_OK if and only if the stream is successfully idled.
Internally, SIO_flush calls Dxx_idle and flushes all pending data.
If a callback was specified in the SIO_Attrs structure used with
SIO_create, then SIO_flush performs no processing and returns
SYS_OK.
Constraints and
Calling Context
❏
SIO_flush cannot be called from an HWI.
❏
If SIO_flush is called from a SWI, no action is performed.
See Also
SIO_flush
Flush a stream