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/usbfs.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/usbfs.c')
-rw-r--r-- | src/stm32/usbfs.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/stm32/usbfs.c b/src/stm32/usbfs.c index a2706d31..6ded901c 100644 --- a/src/stm32/usbfs.c +++ b/src/stm32/usbfs.c @@ -6,6 +6,7 @@ #include <string.h> // NULL #include "autoconf.h" // CONFIG_STM32_FLASH_START_2000 +#include "board/armcm_boot.h" // armcm_enable_irq #include "board/armcm_timer.h" // udelay #include "board/gpio.h" // gpio_out_setup #include "board/io.h" // writeb @@ -249,7 +250,7 @@ usb_reset(void) } // Main irq handler -void __visible +void USB_LP_CAN1_RX0_IRQHandler(void) { uint32_t istr = USB->ISTR; @@ -301,7 +302,6 @@ usb_init(void) USB->DADDR = 0; USB->CNTR = USB_CNTR_RESETM; USB->ISTR = 0; - NVIC_SetPriority(USB_LP_CAN1_RX0_IRQn, 1); - NVIC_EnableIRQ(USB_LP_CAN1_RX0_IRQn); + armcm_enable_irq(USB_LP_CAN1_RX0_IRQHandler, USB_LP_CAN1_RX0_IRQn, 1); } DECL_INIT(usb_init); |