Pass a data buffer or error and control codes to io-char
#include <sys/io-char.h> int tti2(TTYDEV *dev, unsigned char *char_buf, int len, uint16_t ctrl);
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:
If this call returns 0, do nothing. If it returns 1, an event needs to be generated for io-char.
TTYDEV, ttc(), tti(), tto()