add BF spektrum RSSI patch
[inav.git] / src / main / vcp / stm32_it.c
blobc58cca3385909de5bb0c424474e2f79de08f6cb1
1 /**
2 ******************************************************************************
3 * @file stm32_it.c
4 * @author MCD Application Team
5 * @version V4.0.0
6 * @date 21-January-2013
7 * @brief Main Interrupt Service Routines.
8 * This file provides template for all exceptions handler and peripherals
9 * interrupt service routine.
10 ******************************************************************************
11 * @attention
13 * <h2><center>&copy; COPYRIGHT 2013 STMicroelectronics</center></h2>
15 * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
16 * You may not use this file except in compliance with the License.
17 * You may obtain a copy of the License at:
19 * http://www.st.com/software_license_agreement_liberty_v2
21 * Unless required by applicable law or agreed to in writing, software
22 * distributed under the License is distributed on an "AS IS" BASIS,
23 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
24 * See the License for the specific language governing permissions and
25 * limitations under the License.
27 ******************************************************************************
30 /* Includes ------------------------------------------------------------------*/
31 #include "hw_config.h"
32 #include "stm32_it.h"
33 #include "usb_lib.h"
34 #include "vcp/usb_istr.h"
36 /* Private typedef -----------------------------------------------------------*/
37 /* Private define ------------------------------------------------------------*/
38 /* Private macro -------------------------------------------------------------*/
39 /* Private variables ---------------------------------------------------------*/
40 /* Private function prototypes -----------------------------------------------*/
41 /* Private functions ---------------------------------------------------------*/
42 /******************************************************************************/
43 /* Cortex-M Processor Exceptions Handlers */
44 /******************************************************************************/
46 /*******************************************************************************
47 * Function Name : NMI_Handler
48 * Description : This function handles NMI exception.
49 * Input : None
50 * Output : None
51 * Return : None
52 *******************************************************************************/
53 void NMI_Handler(void)
59 /*******************************************************************************
60 * Function Name : MemManage_Handler
61 * Description : This function handles Memory Manage exception.
62 * Input : None
63 * Output : None
64 * Return : None
65 *******************************************************************************/
66 void MemManage_Handler(void)
68 /* Go to infinite loop when Memory Manage exception occurs */
69 while (1) {
73 /*******************************************************************************
74 * Function Name : BusFault_Handler
75 * Description : This function handles Bus Fault exception.
76 * Input : None
77 * Output : None
78 * Return : None
79 *******************************************************************************/
80 void BusFault_Handler(void)
82 /* Go to infinite loop when Bus Fault exception occurs */
83 while (1) {
87 /*******************************************************************************
88 * Function Name : UsageFault_Handler
89 * Description : This function handles Usage Fault exception.
90 * Input : None
91 * Output : None
92 * Return : None
93 *******************************************************************************/
94 void UsageFault_Handler(void)
96 /* Go to infinite loop when Usage Fault exception occurs */
97 while (1) {
101 /*******************************************************************************
102 * Function Name : SVC_Handler
103 * Description : This function handles SVCall exception.
104 * Input : None
105 * Output : None
106 * Return : None
107 *******************************************************************************/
108 void SVC_Handler(void)
112 /*******************************************************************************
113 * Function Name : DebugMon_Handler
114 * Description : This function handles Debug Monitor exception.
115 * Input : None
116 * Output : None
117 * Return : None
118 *******************************************************************************/
119 void DebugMon_Handler(void)
123 /*******************************************************************************
124 * Function Name : PendSV_Handler
125 * Description : This function handles PendSVC exception.
126 * Input : None
127 * Output : None
128 * Return : None
129 *******************************************************************************/
130 void PendSV_Handler(void)
135 /*******************************************************************************
136 * Function Name : USB_IRQHandler
137 * Description : This function handles USB Low Priority interrupts
138 * requests.
139 * Input : None
140 * Output : None
141 * Return : None
142 *******************************************************************************/
143 #if defined(STM32L1XX_MD) || defined(STM32L1XX_HD)|| defined(STM32L1XX_MD_PLUS)|| defined (STM32F37X)
144 void USB_LP_IRQHandler(void)
145 #else
146 void USB_LP_CAN1_RX0_IRQHandler(void)
147 #endif
149 USB_Istr();
152 /*******************************************************************************
153 * Function Name : USB_FS_WKUP_IRQHandler
154 * Description : This function handles USB WakeUp interrupt request.
155 * Input : None
156 * Output : None
157 * Return : None
158 *******************************************************************************/
160 #if defined(STM32L1XX_MD) || defined(STM32L1XX_HD)|| defined(STM32L1XX_MD_PLUS)
161 void USB_FS_WKUP_IRQHandler(void)
162 #else
163 void USBWakeUp_IRQHandler(void)
164 #endif
166 EXTI_ClearITPendingBit(EXTI_Line18);