tti2()

Pass a data buffer or error and control codes to io-char

Synopsis:

#include <sys/io-char.h>

int tti2(TTYDEV *dev, 
         unsigned char *char_buf,
         int len, 
         uint16_t ctrl);

Arguments:

dev
A pointer to the structure that represents the specific device that data has been received on.
char_buf
Contains received data.
len
the size of char_buf .
ctrl
Contains received data and control codes that modify how the data is read and processed. See the TTI_* defines below for more details.

Description:

This function forwards data received by the hardware to io-char and passes error/control codes. This is a version of tti() that's used for processing blocks of characters. It will only handle control characters that are embedded in the character stream (BREAK, PARITY, FRAME & OVERRUN). Drivers must still use the original tti() for all other control characters (QUIT, HANGUP, etc.).

The control type is extracted from ctrl, and is one of:

TTI_BREAK
Indicates a “break” signal has been detected by the hardware, or a VINTR character has been received.
TTI_OVERRUN
An overrun has been detected by the hardware.
TTI_FRAME
A framing error has been detected by the hardware.
TTI_PARITY
A parity error has been detected by the hardware.

Returns:

If this call returns 0, do nothing. If it returns 1, an event needs to be generated for io-char.

Classification:

QNX Neutrino

Safety:
Cancellation point No
Interrupt handler No
Signal handler No
Thread Yes

See also:

TTYDEV, ttc(), tti(), tto()