summaryrefslogtreecommitdiff
path: root/gpxe/src/core/serial_console.c
blob: 0300482af7a6337ba7d2cd5b66f5fc13c7c5fb05 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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,
};