Create release.yml
[betaflight.git] / src / main / vcpf4 / stm32f4xx_it.c
blob148d115766c2fc4d7382eed9467710df57c0a759
1 /*
2 * This file is part of Cleanflight and Betaflight.
4 * Cleanflight and Betaflight are free software. You can redistribute
5 * this software and/or modify this software under the terms of the
6 * GNU General Public License as published by the Free Software
7 * Foundation, either version 3 of the License, or (at your option)
8 * any later version.
10 * Cleanflight and Betaflight are distributed in the hope that they
11 * will be useful, but WITHOUT ANY WARRANTY; without even the implied
12 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 * See the GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this software.
18 * If not, see <http://www.gnu.org/licenses/>.
21 #include "platform.h"
23 #include "stm32f4xx_it.h"
24 #include "stm32f4xx_conf.h"
26 #include "usb_core.h"
27 #include "usbd_core.h"
28 #include "usbd_cdc_core.h"
30 extern uint32_t USBD_OTG_ISR_Handler (USB_OTG_CORE_HANDLE *pdev);
31 extern USB_OTG_CORE_HANDLE USB_OTG_dev;
33 #ifdef USB_OTG_HS_DEDICATED_EP1_ENABLED
34 extern uint32_t USBD_OTG_EP1IN_ISR_Handler (USB_OTG_CORE_HANDLE *pdev);
35 extern uint32_t USBD_OTG_EP1OUT_ISR_Handler (USB_OTG_CORE_HANDLE *pdev);
36 #endif
38 /**
39 * @brief This function handles NMI exception.
40 * @param None
41 * @retval None
43 void NMI_Handler(void)
47 /**
48 * @brief This function handles SVCall exception.
49 * @param None
50 * @retval None
52 void SVC_Handler(void)
56 /**
57 * @brief This function handles Debug Monitor exception.
58 * @param None
59 * @retval None
61 void DebugMon_Handler(void)
65 /**
66 * @brief This function handles PendSVC exception.
67 * @param None
68 * @retval None
70 void PendSV_Handler(void)
74 /******************************************************************************/
75 /* STM32F4xx Peripherals Interrupt Handlers */
76 /* Add here the Interrupt Handler for the used peripheral(s) (PPP), for the */
77 /* available peripheral interrupt handler's name please refer to the startup */
78 /* file (startup_stm32f4xx.s). */
79 /******************************************************************************/
81 #ifdef USE_USB_OTG_FS
82 void OTG_FS_WKUP_IRQHandler(void)
84 if (USB_OTG_dev.cfg.low_power)
86 *(uint32_t *)(0xE000ED10) &= 0xFFFFFFF9 ;
87 SystemInit();
88 USB_OTG_UngateClock(&USB_OTG_dev);
90 EXTI_ClearITPendingBit(EXTI_Line18);
92 #endif
94 /**
95 * @brief This function handles EXTI15_10_IRQ Handler.
96 * @param None
97 * @retval None
99 #ifdef USE_USB_OTG_HS
100 void OTG_HS_WKUP_IRQHandler(void)
102 if (USB_OTG_dev.cfg.low_power)
104 *(uint32_t *)(0xE000ED10) &= 0xFFFFFFF9 ;
105 SystemInit();
106 USB_OTG_UngateClock(&USB_OTG_dev);
108 EXTI_ClearITPendingBit(EXTI_Line20);
110 #endif
113 * @brief This function handles OTG_HS Handler.
114 * @param None
115 * @retval None
117 #ifdef USE_USB_OTG_HS
118 void OTG_HS_IRQHandler(void)
119 #else
120 void OTG_FS_IRQHandler(void)
121 #endif
123 USBD_OTG_ISR_Handler (&USB_OTG_dev);
126 #ifdef USB_OTG_HS_DEDICATED_EP1_ENABLED
128 * @brief This function handles EP1_IN Handler.
129 * @param None
130 * @retval None
132 void OTG_HS_EP1_IN_IRQHandler(void)
134 USBD_OTG_EP1IN_ISR_Handler (&USB_OTG_dev);
138 * @brief This function handles EP1_OUT Handler.
139 * @param None
140 * @retval None
142 void OTG_HS_EP1_OUT_IRQHandler(void)
144 USBD_OTG_EP1OUT_ISR_Handler (&USB_OTG_dev);
146 #endif