Skip to content
Snippets Groups Projects
Commit fe594126 authored by Kaspar Schleiser's avatar Kaspar Schleiser
Browse files

cpu: x86: remove obsolete uart0 code

parent f433c9a5
No related branches found
No related tags found
No related merge requests found
......@@ -97,39 +97,6 @@ ssize_t x86_uart_read(char *buf, size_t len)
return read;
}
#ifdef MODULE_UART0
static void com_handler(uint8_t irq_num)
{
(void) irq_num; /* == UART_IRQ */
switch (inb(UART_PORT + IIR) & IIR_INT_MASK) {
case IIR_INT_BR: {
while (is_input_empty()) {
asm volatile ("pause");
}
do {
uint8_t c = inb(UART_PORT + RBR);
uart0_handle_incoming(c);
} while (!is_input_empty());
uart0_notify_thread();
break;
}
case IIR_INT_TH:
case IIR_INT_LS:
case IIR_INT_TO:
default:
break;
}
}
#endif /* ifdef MODULE_UART0 */
void x86_init_uart(void)
{
#ifdef MODULE_UART0
x86_pic_set_handler(UART_IRQ, com_handler);
x86_pic_enable_irq(UART_IRQ);
outb(UART_PORT + IER, IER_RECV); /* Enable receive interrupt */
puts("UART initialized");
#endif
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment