diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2019-08-21 13:52:43 -0400 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2019-08-22 09:58:58 -0400 |
commit | 4ef53ab0953ac664a9935b26cd6536aac44eaec7 (patch) | |
tree | 5cb2fb571e7ae34c30457eed01c8c8766c4cd115 /src/stm32/usbotg.c | |
parent | a44bc950a393644b1af6b2e83bdcfc265a852583 (diff) | |
download | kutter-4ef53ab0953ac664a9935b26cd6536aac44eaec7.tar.gz kutter-4ef53ab0953ac664a9935b26cd6536aac44eaec7.tar.xz kutter-4ef53ab0953ac664a9935b26cd6536aac44eaec7.zip |
stm32: Update code to use armcm_boot mechanism
Replace the stm32 provided assembler with the src/generic/armcm_boot.c
mechanism.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Diffstat (limited to 'src/stm32/usbotg.c')
-rw-r--r-- | src/stm32/usbotg.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/stm32/usbotg.c b/src/stm32/usbotg.c index 95adfd36..397a2863 100644 --- a/src/stm32/usbotg.c +++ b/src/stm32/usbotg.c @@ -6,6 +6,7 @@ #include <string.h> // NULL #include "autoconf.h" // CONFIG_MACH_STM32F446 +#include "board/armcm_boot.h" // armcm_enable_irq #include "board/io.h" // writel #include "board/usb_cdc.h" // usb_notify_ep0 #include "board/usb_cdc_ep.h" // USB_CDC_EP_BULK_IN @@ -323,7 +324,7 @@ usb_suspend(void) } // Main irq handler -void __visible +void OTG_FS_IRQHandler(void) { uint32_t sts = OTG->GINTSTS; @@ -388,8 +389,7 @@ usb_init(void) OTG->GINTMSK = (USB_OTG_GINTMSK_USBRST | USB_OTG_GINTSTS_USBSUSP | USB_OTG_GINTMSK_RXFLVLM | USB_OTG_GINTMSK_IEPINT); OTG->GAHBCFG = USB_OTG_GAHBCFG_GINT; - NVIC_SetPriority(OTG_FS_IRQn, 1); - NVIC_EnableIRQ(OTG_FS_IRQn); + armcm_enable_irq(OTG_FS_IRQHandler, OTG_FS_IRQn, 1); // Enable USB OTG->GCCFG |= USB_OTG_GCCFG_PWRDWN; |