Linux Device Drivers 3 / Драйверы устройств Линукс (третье издание): 18.7. The tty_operations Structure in Detail
| Английский оригинал | Перевод на русский | |
|---|---|---|
Сожалеем, но текст оригинала доступен только зарегистрированным пользователям. |
18.7. Подробнее о структуре tty_operations hardorsoft 26.10.10 в 07:04 |
|
|
Структура tty_operations содержит указатели на все функции tty- hardorsoft 26.10.10 в 07:04 |
||
|
int (*open)(struct tty_struct * tty, struct file * filp); hardorsoft 26.10.10 в 07:05 |
||
|
void (*close)(struct tty_struct * tty, struct file * filp); hardorsoft 26.10.10 в 07:16 |
||
|
int (*write)(struct tty_struct * tty, const unsigned char *buf, int hardorsoft 26.10.10 в 07:16 |
||
|
void (*put_char)(struct tty_struct *tty, unsigned char ch); hardorsoft 26.10.10 в 07:17 |
||
|
void (*flush_chars)(struct tty_struct *tty); hardorsoft 26.10.10 в 07:19 |
||
|
Функции используются, когда ядро хочет очистить данные hardorsoft 26.10.10 в 07:20 |
||
|
int (*write_room)(struct tty_struct *tty); hardorsoft 26.10.10 в 07:22 |
||
|
Функция возвращает размер свободного пространства в буфере. hardorsoft 26.10.10 в 07:22 |
||
|
int (*chars_in_buffer)(struct tty_struct *tty); hardorsoft 26.10.10 в 07:22 |
||
|
Функция возвращает количество символов находящихся в буфере. hardorsoft 26.10.10 в 07:23 |
||
|
int (*ioctl)(struct tty_struct *tty, struct file * file, unsigned hardorsoft 26.10.10 в 07:23 |
||
|
Функция ioctl. Эта функция вызывается ядром, когда происходит hardorsoft 26.10.10 в 07:23 |
||
|
void (*set_termios)(struct tty_struct *tty, struct termios * old); hardorsoft 26.10.10 в 07:24 |
||
|
Функция set_termios. Эта функция вызывается ядром tty-устройств, hardorsoft 26.10.10 в 07:24 |
||
|
void (*throttle)(struct tty_struct * tty); hardorsoft 26.10.10 в 07:25 |
||
|
Функции, управляющие прохождением данных. Эти функции hardorsoft 26.10.10 в 07:25 |
||
|
void (*hangup)(struct tty_struct *tty); hardorsoft 26.10.10 в 07:25 |
||
|
void (*break_ctl)(struct tty_struct *tty, int state); hardorsoft 26.10.10 в 07:25 |
||
|
Функция управления line break. Эта функция вызывается для hardorsoft 26.10.10 в 07:26 |
||
|
void (*flush_buffer)(struct tty_struct *tty); hardorsoft 26.10.10 в 07:27 |
||
|
void (*set_ldisc)(struct tty_struct *tty); hardorsoft 26.10.10 в 07:28 |
||
|
void (*send_xchar)(struct tty_struct *tty, char ch); hardorsoft 26.10.10 в 07:28 void (*send_xchar)(struct tty_struct *tty, char ch); hardorsoft 26.10.10 в 07:28 |
||
|
int (*read_proc)(char *page, char **start, off_t off, int count, int hardorsoft 26.10.10 в 07:28 |
||
|
Функции чтения и записи в /proc. hardorsoft 26.10.10 в 07:28 |
||
|
int (*tiocmget)(struct tty_struct *tty, struct file *file); hardorsoft 26.10.10 в 07:28 |
||
|
Для получения текущего состояния линии. Если драйвер возвратил hardorsoft 26.10.10 в 07:29 |
||
|
int (*tiocmset)(struct tty_struct *tty, struct file *file, unsigned hardorsoft 26.10.10 в 07:29 |
