diff options
Diffstat (limited to 'src/arch/amd64/serial.c')
-rw-r--r-- | src/arch/amd64/serial.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/arch/amd64/serial.c b/src/arch/amd64/serial.c index d63d9dd..fe21629 100644 --- a/src/arch/amd64/serial.c +++ b/src/arch/amd64/serial.c @@ -18,7 +18,7 @@ int serial_init(void) { outb(PORT + 0, 0xAE); // test by sending 0xAE uint8_t response = inb(PORT + 0); - if(response != 0xAE) { + if (response != 0xAE) { // TODO panic here? return -1; } @@ -30,18 +30,18 @@ int serial_init(void) { uint8_t serial_in(void) { // wait for data to be available - while((inb(PORT + 5) & 0x01) == 0); + while ((inb(PORT + 5) & 0x01) == 0); return inb(PORT); } void serial_out(uint8_t ch) { // wait for output to be free - while((inb(PORT + 5) & 0x20) == 0); + while ((inb(PORT + 5) & 0x20) == 0); outb(PORT, ch); } void serial_out_str(const char *str) { - for(; *str != '\0'; str++) { + for (; *str != '\0'; str++) { serial_out(*str); } } |