aboutsummaryrefslogtreecommitdiff
path: root/kernel/drivers
diff options
context:
space:
mode:
authorChristian Cunningham <cc@localhost>2022-03-25 13:10:20 -0700
committerChristian Cunningham <cc@localhost>2022-03-25 13:10:20 -0700
commit9322e7bfed9d336377d588623357b93d02312afa (patch)
treed787153f94ae4e7d49a814038f31aa87e32bc27c /kernel/drivers
parent357102ee9ccaea7e26c95e409c4c364a63aed423 (diff)
UART FIFO Interrupting
Diffstat (limited to 'kernel/drivers')
-rw-r--r--kernel/drivers/uart.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/kernel/drivers/uart.c b/kernel/drivers/uart.c
index 33f9e82..bd12486 100644
--- a/kernel/drivers/uart.c
+++ b/kernel/drivers/uart.c
@@ -37,6 +37,8 @@ void uart_init(void)
store32((1<<4)|(1<<5)|(1<<6), UART0_LCRH);
// Mask all interrupts
store32((1<<1)|(1<<4)|(1<<5)|(1<<6)|(1<<7)|(1<<8)|(1<<9)|(1<<10), UART0_IMSC);
+ // Interrupt when FIFO is 1/8 full
+ store32((UART_FIFO_18 << 3) | (UART_FIFO_12 << 0), UART0_IFLS);
// Enable UART0
store32((1<<0)|(1<<8)|(1<<9), UART0_CR);
}