SIO_idle
Application Program Interface
2-397
C Interface
Syntax
status = SIO_idle(stream);
Parameters
SIO_Handle stream;
/* stream handle */
Return Value
Int
status;
/* result of operation */
Description
If stream is being used for output, SIO_idle causes any currently buffered
data to be transferred to the output device associated with stream.
SIO_idle suspends program execution for as long as is required for the
data to be consumed by the underlying device.
If stream is being used for input, SIO_idle causes any currently buffered
data to be discarded. The underlying device connected to stream is idled
as a result of calling SIO_idle. In general, the interrupt is disabled for this
device.
If discarding of unrendered output is desired, use SIO_flush instead.
One of the purposes of this function is to provide synchronization with the
external environment.
SIO_idle returns SYS_OK if and only if the stream is successfully idled.
Internally, SIO_idle calls Dxx_idle to idle the device.
If a callback was specified in the SIO_Attrs structure used with
SIO_create, then SIO_idle performs no processing and returns SYS_OK.
Constraints and
Calling Context
❏
SIO_idle cannot be called from an HWI.
❏
If SIO_idle is called from a SWI, no action is performed.
See Also
SIO_idle
Idle a stream