Hardware Reference
In-Depth Information
tcflush(3)
The tcflush(3) call can be used to flush pending input or output data from the serial
port buffers.
int tcflush(int fd, int queue_selector);
where
fd is the open TTY file descriptor.
queue_selector determines which queue(s) are to be flushed.
The following values are used for the queue_selector argument :
queue_selector
Description
TCIFLUSH
Flushes unread incoming data
TCOFLUSH
Flushes untransmitted output data
TCIOFLUSH
Flushes both unread and untransmitted data
The following example flushes pending input data:
int rc;
rc = tcflush(fd,TCIFLUSH);
tcflow(3)
Various flow control operations can be performed by calling the tcflow(3) function:
int tcflow(int fd, int action);
where
fd is the open TTY file descriptor.
action is the flow control action required (as shown in the following table).
The valid choices for action are as follows:
action
Description
TCOOFF
Suspends output (transmission stops)
TCOON
Resumes output
TCIOFF
Immediately sends a STOP character to stop the remote device
TCION
Transmits a START character to resume the remote device
 
 
Search WWH ::




Custom Search