summaryrefslogtreecommitdiffstats
path: root/hal/uart1.tpp
diff options
context:
space:
mode:
authorNao Pross <naopross@thearcway.org>2018-05-04 01:37:04 +0200
committerNao Pross <naopross@thearcway.org>2018-05-04 01:37:04 +0200
commit7bec778c9a59416e3214ac28a6bce29dd03c9c00 (patch)
treea21c42d3ae7d6909963ce9b4818f90ae1b15c454 /hal/uart1.tpp
parentStart own HAL implementation based on MCC's generated files (diff)
downloadSAMLiquidSmoke-7bec778c9a59416e3214ac28a6bce29dd03c9c00.tar.gz
SAMLiquidSmoke-7bec778c9a59416e3214ac28a6bce29dd03c9c00.zip
Update pin class to support input and output mode
Also, minor changes in uart1.tpp
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;
}
}