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. One of:
  • TTI_BREAK — The hardware detected a “break” signal or received a VINTR character.
  • TTI_OVERRUN — The hardware detected an overrun.
  • TTI_FRAME — The hardware detected a framing error.
  • TTI_PARITY — The hardware detected a parity error.

Description:

The tti2() function forwards data received by the hardware to io-char, and passes error and control codes. This function is a version of tti() that processes blocks of characters. The function only handles control characters that are embedded in the character stream (BREAK, PARITY, FRAME, and OVERRUN). Drivers must still use the original tti() for all other control characters (QUIT, HANGUP, etc.).

Returns:

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

Classification:

QNX OS

Safety:
Cancellation point No
Signal handler No
Thread Yes
Page updated: