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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user