aboutsummaryrefslogtreecommitdiffstats
path: root/src/lpc176x/usbserial.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/usbserial.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/usbserial.c')
-rw-r--r--src/lpc176x/usbserial.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lpc176x/usbserial.c b/src/lpc176x/usbserial.c
index 90e72cc4..95ce6e74 100644
--- a/src/lpc176x/usbserial.c
+++ b/src/lpc176x/usbserial.c
@@ -5,8 +5,8 @@
// This file may be distributed under the terms of the GNU GPLv3 license.
#include <string.h> // memcpy
-#include "LPC17xx.h" // LPC_SC
#include "autoconf.h" // CONFIG_SMOOTHIEWARE_BOOTLOADER
+#include "board/armcm_boot.h" // armcm_enable_irq
#include "board/armcm_timer.h" // udelay
#include "board/irq.h" // irq_disable
#include "board/misc.h" // timer_read_time
@@ -265,7 +265,7 @@ usb_request_bootloader(void)
* Setup and interrupts
****************************************************************/
-void __visible
+void
USB_IRQHandler(void)
{
uint32_t udis = LPC_USB->USBDevIntSt;
@@ -319,8 +319,7 @@ usbserial_init(void)
sie_cmd_write(SIE_CMD_SET_DEVICE_STATUS, 1);
// enable irqs
LPC_USB->USBDevIntEn = DEV_STAT | EP_SLOW;
- NVIC_SetPriority(USB_IRQn, 1);
- usb_irq_enable();
+ armcm_enable_irq(USB_IRQHandler, USB_IRQn, 1);
}
DECL_INIT(usbserial_init);