diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2008-05-07 21:29:50 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2008-05-07 21:29:50 -0400 |
commit | 1812e20b4b4edd574e21637c6e57ca17797f155c (patch) | |
tree | 4f5844905a1a53365d493a436b4d3ac135e4e34d /src/output.c | |
parent | d9b0659a82cf4c34f2eaf19dbf8dad99d110d281 (diff) | |
download | seabios-1812e20b4b4edd574e21637c6e57ca17797f155c.tar.gz |
Add support for sending debug messages to a serial port.
Enable by turning on CONFIG_DEBUG_SERIAL option.
Diffstat (limited to 'src/output.c')
-rw-r--r-- | src/output.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/output.c b/src/output.c index fc77c214..b2f28e9f 100644 --- a/src/output.c +++ b/src/output.c @@ -24,8 +24,15 @@ screenc(u8 c) static void putc(u16 action, char c) { - outb(c, PORT_BIOS_DEBUG); + if (CONFIG_DEBUG_SERIAL) + // Send character to serial port. + debug_serial(c); + else + // Send character to debug port. + outb(c, PORT_BIOS_DEBUG); + if (action) { + // Send character to video screen. if (c == '\n') screenc('\r'); screenc(c); |