2 * Copyright (C) 2003, 2004 Stefan Reinauer
4 * See the file "COPYING" for further information about
5 * the copyright and warranty status of this work.
9 #include "libopenbios/bindings.h"
10 #include "kernel/kernel.h"
11 #include "drivers/drivers.h"
12 #include "libopenbios/fontdata.h"
14 #include "libc/vsprintf.h"
15 #include "libopenbios/sys_info.h"
18 /* ******************************************************************
19 * simple polling video/keyboard console functions
20 * ****************************************************************** */
22 #ifdef CONFIG_DEBUG_CONSOLE
23 /* ******************************************************************
24 * common functions, implementing simple concurrent console
25 * ****************************************************************** */
29 #ifdef CONFIG_DEBUG_CONSOLE_SERIAL
37 #ifdef CONFIG_DEBUG_CONSOLE_SERIAL
38 if (uart_charav(CONFIG_SERIAL_PORT
))
41 #ifdef CONFIG_DEBUG_CONSOLE_VGA
42 if (pc_kbd_dataready())
50 #ifdef CONFIG_DEBUG_CONSOLE_SERIAL
51 if (uart_charav(CONFIG_SERIAL_PORT
))
52 return (uart_getchar(CONFIG_SERIAL_PORT
));
54 #ifdef CONFIG_DEBUG_CONSOLE_VGA
55 if (pc_kbd_dataready())
56 return (pc_kbd_readdata());
63 #ifdef CONFIG_DEBUG_CONSOLE_SERIAL
73 #endif // CONFIG_DEBUG_CONSOLE