mirror of
https://github.com/ipxe/ipxe
synced 2025-12-30 22:08:48 +03:00
[Serial] Split serial console from serial driver
This commit is contained in:
committed by
Michael Brown
parent
f866b17998
commit
831db76ff7
31
src/core/serial_console.c
Normal file
31
src/core/serial_console.c
Normal file
@@ -0,0 +1,31 @@
|
||||
#include <gpxe/init.h>
|
||||
#include <gpxe/serial.h>
|
||||
#include "console.h"
|
||||
|
||||
/** @file
|
||||
*
|
||||
* Serial console
|
||||
*
|
||||
*/
|
||||
|
||||
struct console_driver serial_console __console_driver;
|
||||
|
||||
static void serial_console_init ( void ) {
|
||||
/* Serial driver initialization should already be done,
|
||||
* time to enable the serial console. */
|
||||
serial_console.disabled = 0;
|
||||
}
|
||||
|
||||
struct console_driver serial_console __console_driver = {
|
||||
.putchar = serial_putc,
|
||||
.getchar = serial_getc,
|
||||
.iskey = serial_ischar,
|
||||
.disabled = 1,
|
||||
};
|
||||
|
||||
/**
|
||||
* Serial console initialisation function
|
||||
*/
|
||||
struct init_fn serial_console_init_fn __init_fn ( INIT_CONSOLE ) = {
|
||||
.initialise = serial_console_init,
|
||||
};
|
||||
Reference in New Issue
Block a user