Tty driver Quick Reference

Source: Internet
Author: User
# Include <Linux/tty_driver.h>
 
The header file contains the definition and declaration of struct tty_driver and some different symbols in this structure.
 
# Include <Linux/tty. h>
 
The header file contains the definition of the tty_struct structure and several different macro definitions to facilitate access to a single value of the members of the struct termios. It also contains the TTY drive core function declaration.
 
# Include <Linux/tty_flip.h>
 
The header file contains several tty flip buffer inline functions, making it easy to operate the flip Buffer structure.
 
# Include <ASM/termios. h>
Header file, including the definition of struct termio, used for the specific hardware platform created by the kernel.
 
Struct tty_driver * alloc_tty_driver (INT lines );
 
Create a struct tty_driver, which can be passed to the tty_register_driver and tty_unregister_driver functions.
 
Void put_tty_driver (struct tty_driver * driver );
 
Function to clear the struct tty_driver structure that has not been successfully registered to the TTY kernel.
 
Void tty_set_operations (struct tty_driver * driver, struct tty_operations * op );
Function to initialize the function callback of struct tty_driver. It is necessary to call this function before tty_register_driver can be called.
 
Int tty_register_driver (struct tty_driver * driver );
 
Int tty_unregister_driver (struct tty_driver * driver );
 
Function, register and deregister a tty driver from the TTY core.
 
Void tty_register_device (struct tty_driver * driver, unsigned minor, struct device * Device );
 
Void tty_unregister_device (struct tty_driver * driver, unsigned minor );
Register and deregister a single tty device for the TTY core.
 
Void tty_insert_flip_char (struct tty_struct * tty, unsigned char CH, char flag );
 
The function that inserts characters into the tty device's flip buffer to be read by the user.
 
Tty_normal
 
Tty_break
 
Tty_frame
 
Tty_parity
 
Tty_overrun
Different flag values are used in the tty_insert_flip_char function.
 
Int tty_get_baud_rate (struct tty_struct * tty );
 
Function to obtain the baud rate currently set for a specific tty device.
 
Void tty_flip_buffer_push (struct tty_struct * tty );
 
Function to push data in the current flip buffer to the user.
 
Tty_std_termios
 
Variable, uses a set of common default line settings to initialize a termios Structure

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.