aboutsummaryrefslogtreecommitdiffstats
path: root/src/lpc176x/serial.c
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2019-08-21 20:27:15 -0400
committerKevin O'Connor <kevin@koconnor.net>2019-08-22 09:58:58 -0400
commit1022729a2adbeeb985848e82bb07f7af4d079c06 (patch)
tree84665cfd82f576ef79c6ca6aace816dbbe4da570 /src/lpc176x/serial.c
parent6409eda0580810599422c2a8a2ddce171d9e47ad (diff)
downloadkutter-1022729a2adbeeb985848e82bb07f7af4d079c06.tar.gz
kutter-1022729a2adbeeb985848e82bb07f7af4d079c06.tar.xz
kutter-1022729a2adbeeb985848e82bb07f7af4d079c06.zip
lpc176x: Update code to use armcm_boot mechanism
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/lpc176x/serial.c')
-rw-r--r--src/lpc176x/serial.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lpc176x/serial.c b/src/lpc176x/serial.c
index f36a485c..3d0432ba 100644
--- a/src/lpc176x/serial.c
+++ b/src/lpc176x/serial.c
@@ -4,7 +4,7 @@
//
// This file may be distributed under the terms of the GNU GPLv3 license.
-#include "LPC17xx.h" // LPC_UART0
+#include "board/armcm_boot.h" // armcm_enable_irq
#include "autoconf.h" // CONFIG_SERIAL_BAUD
#include "board/irq.h" // irq_save
#include "board/serial_irq.h" // serial_rx_data
@@ -33,7 +33,7 @@ kick_tx(void)
}
}
-void __visible
+void
UART0_IRQHandler(void)
{
uint32_t iir = LPC_UART0->IIR, status = iir & 0x0f;
@@ -76,8 +76,7 @@ serial_init(void)
gpio_peripheral(GPIO(0, 2), 1, 0);
// Enable receive irq
- NVIC_SetPriority(UART0_IRQn, 0);
- NVIC_EnableIRQ(UART0_IRQn);
+ armcm_enable_irq(UART0_IRQHandler, UART0_IRQn, 0);
LPC_UART0->IER = 0x01;
}
DECL_INIT(serial_init);