Move interrupt handler into device driver, and rename the OPT_MCU_STM32 constants.
This commit is contained in:
@@ -6,7 +6,7 @@ CFLAGS += \
|
||||
-mcpu=cortex-m0 \
|
||||
-mfloat-abi=soft \
|
||||
-nostdlib -nostartfiles \
|
||||
-DCFG_TUSB_MCU=OPT_MCU_STM32_FSDEV
|
||||
-DCFG_TUSB_MCU=OPT_MCU_STM32F0x0
|
||||
|
||||
ST_HAL_DRIVER = hw/mcu/st/st_driver/STM32F0xx_HAL_Driver
|
||||
ST_CMSIS = hw/mcu/st/st_driver/CMSIS/Device/ST/STM32F0xx
|
||||
|
||||
@@ -95,12 +95,6 @@ void board_init(void)
|
||||
__HAL_RCC_USB_CLK_ENABLE();
|
||||
}
|
||||
|
||||
void dcd_fs_irqHandler(void);
|
||||
void USB_IRQHandler(void)
|
||||
{
|
||||
dcd_fs_irqHandler();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// Board porting API
|
||||
//--------------------------------------------------------------------+
|
||||
|
||||
@@ -7,7 +7,7 @@ CFLAGS += \
|
||||
-mfloat-abi=hard \
|
||||
-mfpu=fpv4-sp-d16 \
|
||||
-nostdlib -nostartfiles \
|
||||
-DCFG_TUSB_MCU=OPT_MCU_STM32_FSDEV
|
||||
-DCFG_TUSB_MCU=OPT_MCU_STM32F3x3
|
||||
|
||||
ST_HAL_DRIVER = hw/mcu/st/st_driver/STM32F3xx_HAL_Driver
|
||||
ST_CMSIS = hw/mcu/st/st_driver/CMSIS/Device/ST/STM32F3xx
|
||||
|
||||
@@ -109,31 +109,6 @@ void board_init(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
// USB defaults to using interrupts 19, 20, and 42 (based on SYSCFG_CFGR1.USB_IT_RMP)
|
||||
// FIXME: Do all three need to be handled, or just the LP one?
|
||||
void dcd_fs_irqHandler(void);
|
||||
// USB high-priority interrupt (Channel 19): Triggered only by a correct
|
||||
// transfer event for isochronous and double-buffer bulk transfer to reach
|
||||
// the highest possible transfer rate.
|
||||
void USB_HP_CAN_TX_IRQHandler(void)
|
||||
{
|
||||
dcd_fs_irqHandler();
|
||||
}
|
||||
|
||||
// USB low-priority interrupt (Channel 20): Triggered by all USB events
|
||||
// (Correct transfer, USB reset, etc.). The firmware has to check the
|
||||
// interrupt source before serving the interrupt.
|
||||
void USB_LP_CAN_RX0_IRQHandler(void)
|
||||
{
|
||||
dcd_fs_irqHandler();
|
||||
}
|
||||
// USB wakeup interrupt (Channel 42): Triggered by the wakeup event from the USB
|
||||
// Suspend mode.
|
||||
void USBWakeUp_IRQHandler(void)
|
||||
{
|
||||
dcd_fs_irqHandler();
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// Board porting API
|
||||
//--------------------------------------------------------------------+
|
||||
|
||||
Reference in New Issue
Block a user