From 5ba212fe7123d454414f64d42ec7ff0822458c13 Mon Sep 17 00:00:00 2001 From: Aleksa Vuckovic Date: Sat, 25 Feb 2023 07:26:22 +0100 Subject: ANSI C: // -> /* */ --- kernel/src/devices/serial.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'kernel/src/devices/serial.c') diff --git a/kernel/src/devices/serial.c b/kernel/src/devices/serial.c index 2d2da51..006f25a 100644 --- a/kernel/src/devices/serial.c +++ b/kernel/src/devices/serial.c @@ -3,13 +3,14 @@ void init_serial() { - outb(PORT + 1, 0x00); // Disable all interrupts - outb(PORT + 3, 0x80); // Enable DLAB (set baud rate divisor) - outb(PORT + 0, 0x03); // Set divisor to 3 (lo byte) 38400 baud - outb(PORT + 1, 0x00); // (hi byte) - outb(PORT + 3, 0x03); // 8 bits, no parity, one stop bit - outb(PORT + 2, 0xC7); // Enable FIFO, clear them, with 14-byte threshold - outb(PORT + 4, 0x0B); // IRQs enabled, RTS/DSR set + outb(PORT + 1, 0x00); /* Disable all interrupts */ + outb(PORT + 3, 0x80); /* Enable DLAB (set baud rate divisor) */ + outb(PORT + 0, 0x03); /* Set divisor to 3 (lo byte) 38400 baud */ + outb(PORT + 1, 0x00); /* (hi byte) */ + outb(PORT + 3, 0x03); /* 8 bits, no parity, one stop bit */ + outb(PORT + 2, + 0xC7); /* Enable FIFO, clear them, with 14-byte threshold */ + outb(PORT + 4, 0x0B); /* IRQs enabled, RTS/DSR set */ } uint8_t serial_received() -- cgit v1.2.3