summaryrefslogtreecommitdiffstats
path: root/hal/uart1.tpp
diff options
context:
space:
mode:
Diffstat (limited to 'hal/uart1.tpp')
-rw-r--r--hal/uart1.tpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/hal/uart1.tpp b/hal/uart1.tpp
index a8a32f0..9526650 100644
--- a/hal/uart1.tpp
+++ b/hal/uart1.tpp
@@ -17,6 +17,11 @@ void __ISR(_UART_1_VECTOR, IPL1AUTO) usart_1_isr()
{
if (IFS1bits.U1RXIF) {
uart::rx_buffer[0].push_back(static_cast<uint8_t>(U1RXREG));
+
+ IFS1bits.U1RXIF = 0;
+ } else if (IFS1bits.U1TXIF) {
+
+ IFS1bits.U1TXIF = 0;
}
}