iPXE
|
Serial console. More...
#include <stddef.h>
#include <string.h>
#include <ipxe/init.h>
#include <ipxe/uart.h>
#include <ipxe/console.h>
#include <ipxe/serial.h>
#include <config/console.h>
#include <config/serial.h>
Go to the source code of this file.
Macros | |
#define | CONSOLE_SERIAL ( CONSOLE_USAGE_ALL & ~CONSOLE_USAGE_LOG ) |
#define | CONSOLE_PORT 0 |
#define | CONSOLE_BAUD COMSPEED |
#define | CONSOLE_LCR UART_LCR_WPS ( COMDATA, COMPARITY, COMSTOP ) |
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
static void | serial_putchar (int character) |
Print a character to serial console. More... | |
static int | serial_getchar (void) |
Get character from serial console. More... | |
static int | serial_iskey (void) |
Check for character ready to read from serial console. More... | |
static void | serial_init (void) |
Initialise serial console. More... | |
static void | serial_shutdown (int flags __unused) |
Shut down serial console. More... | |
struct init_fn serial_console_init_fn | __init_fn (INIT_CONSOLE) |
Serial console initialisation function. More... | |
struct startup_fn serial_startup_fn | __startup_fn (STARTUP_EARLY) |
Serial console startup function. More... | |
Variables | |
struct uart | serial_console |
Serial console UART. More... | |
struct console_driver serial_console_driver | __console_driver |
Serial console. More... | |
Serial console.
Definition in file serial.c.
#define CONSOLE_SERIAL ( CONSOLE_USAGE_ALL & ~CONSOLE_USAGE_LOG ) |
#define CONSOLE_LCR UART_LCR_WPS ( COMDATA, COMPARITY, COMSTOP ) |
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
static |
Print a character to serial console.
character | Character to be printed |
Definition at line 76 of file serial.c.
References uart::base, serial_console, and uart_transmit().
|
static |
Get character from serial console.
character | Character read from console |
Definition at line 91 of file serial.c.
References uart::base, data, serial_console, uart_data_ready(), and uart_receive().
|
static |
Check for character ready to read from serial console.
True | Character available to read |
False | No character available to read |
Definition at line 118 of file serial.c.
References uart::base, serial_console, and uart_data_ready().
|
static |
Initialise serial console.
Definition at line 137 of file serial.c.
References CONSOLE_BAUD, CONSOLE_LCR, CONSOLE_PORT, DBG, rc, serial_console, strerror(), uart_init(), and uart_select().
|
static |
Shut down serial console.
flags | Shutdown flags |
Definition at line 165 of file serial.c.
References uart::base, serial_console, and uart_flush().
struct init_fn serial_console_init_fn __init_fn | ( | INIT_CONSOLE | ) |
Serial console initialisation function.
struct startup_fn serial_startup_fn __startup_fn | ( | STARTUP_EARLY | ) |
Serial console startup function.
struct uart serial_console |
Serial console UART.
Definition at line 69 of file serial.c.
Referenced by serial_getchar(), serial_init(), serial_iskey(), serial_putchar(), and serial_shutdown().
struct console_driver serial_console_driver __console_driver |
Serial console.