|
iPXE
|
Generic UART. More...
Go to the source code of this file.
Data Structures | |
| struct | uart |
| A generic UART. More... | |
| struct | uart_operations |
| UART operations. More... | |
Functions | |
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
| static | __attribute__ ((always_inline)) void uart_transmit(struct uart *uart |
| Transmit byte. More... | |
| struct uart * | alloc_uart (size_t priv_len) |
| Allocate UART. More... | |
| int | uart_register (struct uart *uart) |
| Register UART. More... | |
| int | uart_register_fixed (void) |
| Register fixed UARTs (when not provided by platform) More... | |
| void | uart_unregister (struct uart *uart) |
| Unregister UART. More... | |
| struct uart * | uart_find (const char *name) |
| Find named UART. More... | |
Variables | |
| static uint8_t | byte |
| struct list_head | uarts |
| struct uart_operations | null_uart_operations |
| Null UART operations. More... | |
Generic UART.
Definition in file uart.h.
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
inlinestatic |
Transmit byte.
Nullify UART.
Drop reference to UART.
Get reference to UART.
Flush transmitted data.
Initialise UART.
Receive byte.
Check if data is ready.
| uart | UART |
| byte | Byte to transmit |
| rc | Return status code |
| uart | UART |
| ready | Data is ready |
| uart | UART |
| byte | Received byte |
| uart | UART |
| rc | Return status code |
| uart | UART |
| uart | UART |
| uart | UART |
Definition at line 92 of file uart.h.
References uart_operations::data_ready, and uart::op.
Allocate UART.
| priv_len | Length of private data |
| uart | UART, or NULL on error |
Definition at line 74 of file uart.c.
References NULL, uart::priv, and zalloc().
Referenced by dwuart_probe().
| int uart_register | ( | struct uart * | uart | ) |
Register UART.
| uart | UART |
| rc | Return status code |
Definition at line 102 of file uart.c.
References DBGC, uart::list, list_add_tail, uart::name, and uarts.
Referenced by dwuart_probe(), and uart_register_fixed().
| int uart_register_fixed | ( | void | ) |
Register fixed UARTs (when not provided by platform)
| rc | Return status code |
Register fixed UARTs (when not provided by platform)
| rc | Return status code |
Definition at line 91 of file uart.c.
References COM1, COM2, COM3, COM4, DBGC, name, rc, strerror(), and uart_register().
Referenced by uart_find().
| void uart_unregister | ( | struct uart * | uart | ) |
Unregister UART.
| uart | UART |
Definition at line 117 of file uart.c.
References uart::list, and list_del.
Referenced by dwuart_probe(), and dwuart_remove().
| struct uart* uart_find | ( | const char * | name | ) |
Find named UART.
| name | UART name |
| uart | UART, or NULL if not found |
Definition at line 130 of file uart.c.
References DBGC, index, uart::list, list_empty, list_for_each_entry, uart::name, name, NULL, rc, strcasecmp(), strerror(), strtoul(), uart_register_fixed(), and uarts.
Referenced by gdbserial_configure().
| struct list_head uarts |
Referenced by fdtcon_default(), uart_find(), and uart_register().
| struct uart_operations null_uart_operations |
1.8.15