diff options
author | Richard Braun <rbraun@sceen.net> | 2017-05-28 17:03:27 +0200 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2017-05-28 17:54:08 +0200 |
commit | c5680f01485f35c1735cdae08b16b63e300b9f6d (patch) | |
tree | 4210d0975efb8a3aac56930473055e2c14314dac /arch/x86/machine/uart.c | |
parent | df6e8f87ad6800ecb348f11b01a42db48237b371 (diff) |
kern/console: implement input handling
Diffstat (limited to 'arch/x86/machine/uart.c')
-rw-r--r-- | arch/x86/machine/uart.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/x86/machine/uart.c b/arch/x86/machine/uart.c index f17bc66e..16b6d925 100644 --- a/arch/x86/machine/uart.c +++ b/arch/x86/machine/uart.c @@ -170,6 +170,10 @@ uart_console_putc(struct console *console, char c) uart_write_char(uart_get_from_console(console), c); } +static struct console_ops uart_console_ops = { + .putc = uart_console_putc, +}; + static void __init uart_init(struct uart *uart, uint16_t port, uint16_t intr) { @@ -191,7 +195,7 @@ uart_init(struct uart *uart, uint16_t port, uint16_t intr) uart_write(uart, UART_REG_LCR, byte); snprintf(name, sizeof(name), "uart%zu", uart_get_id(uart)); - console_init(&uart->console, name, uart_console_putc); + console_init(&uart->console, name, &uart_console_ops); console_register(&uart->console); } |