|
AquilaOS documentation
How it works, and its code
|
Go to the source code of this file.
Data Structures | |
| struct | uart |
| A serial port. More... | |
Functions | |
| int | uart_register (int id, struct uart *u) |
| Registers a UART, as /dev/ttyS<id>. | |
| void | uart_receive_handler (struct uart *u, size_t size) |
| Takes characters a UART received, and gives them to its terminal. | |
| void | uart_transmit_handler (struct uart *u, size_t size) |
| Sends characters that the terminal output to its UART. | |
Takes characters a UART received, and gives them to its terminal.
The UART's driver calls it from its interrupt handler.
| u | the UART |
| size | how many characters to take from it |
Definition at line 35 of file uart.c.
References MIN, uart::read_queue, uart::receive, uart::tty, tty_master_write(), UART_BUF, uart_receive_handler(), and waitq_wakeup().
Referenced by pl011_irq(), uart_8250_irq(), and uart_receive_handler().
| int uart_register | ( | int | id, |
| struct uart * | u ) |
Registers a UART, as /dev/ttyS<id>.
| id | its number (below 192), or -1 for the first free one |
| u | the UART |
Definition at line 278 of file uart.c.
References devices, uart::name, printk(), and uart_register().
Referenced by pl011_init(), uart_8250_attach(), and uart_register().
Sends characters that the terminal output to its UART.
| u | the UART |
| size | how many characters to send, at most |
Definition at line 59 of file uart.c.
References MIN, uart::out, uart::transmit, uart_transmit_handler(), waitq_wakeup(), and uart::write_queue.
Referenced by uart_8250_irq(), uart_master_write(), and uart_transmit_handler().