From 63167f223e1f54910f6b80e698390ee60aec79ee Mon Sep 17 00:00:00 2001 From: Benji Dial Date: Tue, 11 Aug 2020 11:33:21 -0400 Subject: lots of progress currently, BAR fields of IDE drives are all returning zero, and the ATA read function isn't working. i'm not sure why. i'm going to work on VESA next, and come back to the IDE driver later --- src/kernel/serial.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/kernel/serial.c') diff --git a/src/kernel/serial.c b/src/kernel/serial.c index b88c7ec..0f7abe6 100644 --- a/src/kernel/serial.c +++ b/src/kernel/serial.c @@ -54,7 +54,7 @@ bool serr() { return error; } -void sinit() { +void init_serial() { error = false; outb(CP_1 | CP_INT, 0); outb(CP_1 | CP_LINE, CL_BAUD); @@ -64,7 +64,7 @@ void sinit() { outb(CP_1 | CP_FIFO, 0xc7);//? } -void sout(uint8_t b) { +void sout(char b) { if (error) return; uint16_t s = SERIAL_SPIN_LIMIT; @@ -73,28 +73,28 @@ void sout(uint8_t b) { error = true; return; } - outb(CP_1 | CP_DATA, b); + outb(CP_1 | CP_DATA, (uint8_t)b); } -void soutsz(uint8_t *s) { +void soutsz(char *s) { while (*s) sout(*(s++)); } -void soutsn(uint8_t *s, uint8_t n) { +void soutsn(char *s, uint8_t n) { while (n--) sout(*(s++)); } -uint8_t sin() { +char sin() { if (error) return 0; while (!(inb(CP_1 | CP_LINE_S) & CLS_READ)) ;//spin - return inb(CP_1 | CP_DATA); + return (char)inb(CP_1 | CP_DATA); } -void sinsn(uint8_t *s, uint8_t n) { +void sinsn(char *s, uint8_t n) { while (n--) *(s++) = sin(); } \ No newline at end of file -- cgit v1.2.3