UARTUniversal Asynchronous Receiver Transmitter864SoCUART

UART

UARTFIFO


  • 5/6/7/8

  • 1/1.5/2


  • FIFO

UART

UART串口及Linux实现-LMLPHP

1 UART

UART串口及Linux实现-LMLPHP

2 UART

UART

UART

UART串口及Linux实现-LMLPHP

3 UART

线1

0

5678LSB

使1()()

1/1.5/2Linux1.5

UARTUART9600115200460800

LinuxUART

Linux UARTUART/dev/ttyS*备(ttySUARTLinuxttyserial coreserial corettytty driveruart

  • struct uart_driverstruct uart_portstruct uart_opsuart

  •  uart_register_driveruart_add_one_port 

UART串口及Linux实现-LMLPHP

4 UART

struct uart_opsUART

UART串口及Linux实现-LMLPHP

UARTuart_ops

struct uart_driverUARTstruct uart_portUARTstruct uart_ops

UART串口及Linux实现-LMLPHP

UART

UARTplatform_driver

UART串口及Linux实现-LMLPHP

uart_opsuart_opsuart_port

UART串口及Linux实现-LMLPHP

UARTprobeuart_portserial core

UART串口及Linux实现-LMLPHP

Linux

Linuxminicom, cutecom

//open/read/writeLinuxAPI

struct termios options;//tcgetattr(fd, &options);//cfsetispeed(&options, B115200);cfsetospeed(&options, B115200);//8options.c_cflag &= ~CSIZE;options.c_cflag |= CS8;//options.c_cflag &= ~PARENB;//1options.c_cflag &= ~CSTOPB;//tcsetattr(fd, TCANOW, &options);

UART

UARTttyttyUARTUART

UARTUARTinputinputUARTUARTUARTttyserial coreUART

线I2CI2C线i2c_driveri2c_transferI2CSPIspi_driverSPII2C/SPI便

UART4.14seriottyttyttyUART

serio线UARTSerial IOseriostruct serio_busserio线struct serioseriostruct serio_drvierserio

drivers/input/serio/*drivers/input/touchscreen/touchit213.c

4.14serail dev bus

serdev_device_driver_register(struct serdev_device_driver *, struct module *);

使

drivers/bluetooth/hci_bcm.c

 ------ END ------

作者:bigfish99

博客:https://www.cnblogs.com/bigfish0506/

公众号:大鱼嵌入式

UART串口及Linux实现-LMLPHP

05-08 11:53