mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
104 lines
1.7 KiB
C
104 lines
1.7 KiB
C
#include "usbd_core.h"
|
|
#include <stm32f4xx_exti.h>
|
|
#define BREAK() __asm__ volatile ("BKPT");
|
|
|
|
extern USB_OTG_CORE_HANDLE USB_OTG_Core;
|
|
extern uint32_t USBD_OTG_ISR_Handler (USB_OTG_CORE_HANDLE *pdev);
|
|
|
|
/**
|
|
* @brief This function handles NMI exception.
|
|
* @param None
|
|
* @retval None
|
|
*/
|
|
void NMI_Handler(void)
|
|
{
|
|
BREAK();
|
|
}
|
|
|
|
/**
|
|
* @brief This function handles Hard Fault exception.
|
|
* @param None
|
|
* @retval None
|
|
*/
|
|
void HardFault_Handler(void)
|
|
{
|
|
BREAK();
|
|
}
|
|
|
|
/**
|
|
* @brief This function handles Memory Manage exception.
|
|
* @param None
|
|
* @retval None
|
|
*/
|
|
void MemManage_Handler(void)
|
|
{
|
|
BREAK();
|
|
}
|
|
|
|
/**
|
|
* @brief This function handles Bus Fault exception.
|
|
* @param None
|
|
* @retval None
|
|
*/
|
|
void BusFault_Handler(void)
|
|
{
|
|
BREAK();
|
|
}
|
|
|
|
/**
|
|
* @brief This function handles Usage Fault exception.
|
|
* @param None
|
|
* @retval None
|
|
*/
|
|
void UsageFault_Handler(void)
|
|
{
|
|
BREAK();
|
|
}
|
|
|
|
/**
|
|
* @brief This function handles SVCall exception.
|
|
* @param None
|
|
* @retval None
|
|
*/
|
|
void SVC_Handler(void)
|
|
{
|
|
BREAK();
|
|
}
|
|
|
|
/**
|
|
* @brief This function handles Debug Monitor exception.
|
|
* @param None
|
|
* @retval None
|
|
*/
|
|
void DebugMon_Handler(void)
|
|
{
|
|
}
|
|
|
|
/**
|
|
* @brief This function handles PendSVC exception.
|
|
* @param None
|
|
* @retval None
|
|
*/
|
|
void PendSV_Handler(void)
|
|
{
|
|
extern void pendsv_isr_handler(void);
|
|
pendsv_isr_handler();
|
|
}
|
|
|
|
void OTG_FS_WKUP_IRQHandler(void)
|
|
{
|
|
if(USB_OTG_Core.cfg.low_power)
|
|
{
|
|
*(uint32_t *)(0xE000ED10) &= 0xFFFFFFF9 ;
|
|
SystemInit();
|
|
USB_OTG_UngateClock(&USB_OTG_Core);
|
|
}
|
|
EXTI_ClearITPendingBit(EXTI_Line18);
|
|
}
|
|
|
|
void OTG_FS_IRQHandler(void)
|
|
{
|
|
USBD_OTG_ISR_Handler (&USB_OTG_Core);
|
|
}
|
|
|