]> Joshua Wise's Git repositories - netwatch.git/blobdiff - lib/serial.c
More ICH2-specific code diked out.
[netwatch.git] / lib / serial.c
index 0cbb495b2a0a2ea00d0a1259e6d134329f53c1a2..95d830062c6aa7d8ccad55aa4ccb53ed43072b34 100644 (file)
@@ -1,3 +1,13 @@
+/* serial.c
+ * Serial output routines.
+ * NetWatch system management mode administration console
+ *
+ * Copyright (c) 2008 Jacob Potter and Joshua Wise.  All rights reserved.
+ * This program is free software; you can redistribute and/or modify it under
+ * the terms found in the file LICENSE in the root of this source tree.
+ *
+ */
+
 #include <minilib.h>
 #include <io.h>
 
@@ -44,7 +54,9 @@ void serial_init()
 
 void serial_tx(unsigned char c)
 {
-       while (!(_inb(SER_LSR) & SER_LSR_THR_EMPTY))
+       int i = 100000;
+       
+       while (!(_inb(SER_LSR) & SER_LSR_THR_EMPTY) && (i--))
                ;
        _outb(SER_THR, c);
 }
This page took 0.022867 seconds and 4 git commands to generate.