pic: enable legacy pic serial interrupts
This commit is contained in:
parent
667d01e418
commit
9a4ff385bd
12 changed files with 201 additions and 33 deletions
|
|
@ -23,6 +23,7 @@ int serial_init()
|
|||
return 1;
|
||||
}
|
||||
|
||||
outb(COM1 | 1, 0x01); /* Enable interrupts */
|
||||
outb(COM1 | 4, 0x0F); /* Enter normal operation */
|
||||
printf(LOG_SUCCESS "Serial COM1 initialized\n");
|
||||
return 0;
|
||||
|
|
@ -36,3 +37,11 @@ void serial_write(char c)
|
|||
|
||||
outb(COM1, c);
|
||||
}
|
||||
|
||||
void serial_trap()
|
||||
{
|
||||
while ((inb(COM1 | 5) & 0x01) == 0)
|
||||
;
|
||||
char c = inb(COM1);
|
||||
printf("%c", c);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue