X-Git-Url: http://git.joshuawise.com/netwatch.git/blobdiff_plain/c07c6eba644d5b947f38a6fb79489ff3584196cf..6f9272bdabcda81425ec1aaecf26a160535d4749:/lib/serial.c?ds=inline diff --git a/lib/serial.c b/lib/serial.c index 0cbb495..6043db2 100644 --- a/lib/serial.c +++ b/lib/serial.c @@ -44,7 +44,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); }