#include "../../kernel/config.h"
#include "../../kernel/type.h"
+/* Set this to 1 if you want console output duplicated on the first
+ * serial line.
+ */
+#define DUP_CONS_TO_SER 0
+
/* Definitions used by the console driver. */
#define MONO_BASE 0xB0000L /* base of mono video memory */
#define COLOR_BASE 0xB8000L /* base of color video memory */
{
out_char(cons, *tbuf++);
} else {
+#if DUP_CONS_TO_SER
+ if (cons == &cons_table[0]) ser_putc(*tbuf);
+#endif
cons->c_ramqueue[cons->c_rwords++] =
cons->c_attr | (*tbuf++ & BYTE);
cons->c_column++;
return;
}
+#if DUP_CONS_TO_SER
+ if (cons == &cons_table[0] && c != '\0')
+ {
+ if (c == '\n')
+ ser_putc('\r');
+ ser_putc(c);
+ }
+#endif
+
switch(c) {
case 000: /* null is typically used for padding */
return; /* better not do anything */
lsr= COM1_LSR;
thr= COM1_THR;
- for (i= 0; i<100; i++)
+ for (i= 0; i<10000; i++)
{
sys_inb(lsr, &b);
if (b & LSR_THRE)