Serial Fix

Fixes a typo with getc_nb, removes the RTC tick code (since we know it
works now and it is clogging up the screen), read characters in a loop
instead of just once.
This commit is contained in:
Byron Lathi
2023-11-28 23:23:31 -08:00
parent fd9ccdbce4
commit e73d8db74c
2 changed files with 10 additions and 10 deletions

View File

@@ -8,7 +8,7 @@
void handle_rtc_interrupt() {
// cputs("In IRQ interrupt!\n");
cputc('A');
// cputc('A');
send_eoi();
asm volatile ("rti");
}
@@ -40,12 +40,12 @@ int main() {
serial_puts("Hello from serial!\n");
c = serial_getc();
serial_puts("Got a character!: ");
serial_putc(c);
while(1);
while(1) {
c = serial_getc();
serial_puts("Got a character!: ");
serial_putc(c);
serial_putc('\n');
}
return 0;
}