STM32F0xx Standard Peripherals Firmware Library
|
STM32F0xx_StdPeriph_Examples/CAN/CAN_Networking/stm32f0xx_it.c
Go to the documentation of this file.
00001 /** 00002 ****************************************************************************** 00003 * @file CAN/CAN_Networking/stm32f0xx_it.c 00004 * @author MCD Application Team 00005 * @version V1.4.0 00006 * @date 24-July-2014 00007 * @brief Main Interrupt Service Routines. 00008 * This file provides template for all exceptions handler and 00009 * peripherals interrupt service routine. 00010 ****************************************************************************** 00011 * @attention 00012 * 00013 * <h2><center>© COPYRIGHT 2014 STMicroelectronics</center></h2> 00014 * 00015 * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License"); 00016 * You may not use this file except in compliance with the License. 00017 * You may obtain a copy of the License at: 00018 * 00019 * http://www.st.com/software_license_agreement_liberty_v2 00020 * 00021 * Unless required by applicable law or agreed to in writing, software 00022 * distributed under the License is distributed on an "AS IS" BASIS, 00023 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00024 * See the License for the specific language governing permissions and 00025 * limitations under the License. 00026 * 00027 ****************************************************************************** 00028 */ 00029 00030 /* Includes ------------------------------------------------------------------*/ 00031 #include "stm32f0xx_it.h" 00032 00033 /** @addtogroup STM32F0xx_StdPeriph_Examples 00034 * @{ 00035 */ 00036 00037 /** @addtogroup CAN_Networking 00038 * @{ 00039 */ 00040 00041 /* Private typedef -----------------------------------------------------------*/ 00042 /* Private define ------------------------------------------------------------*/ 00043 /* Private macro -------------------------------------------------------------*/ 00044 /* Private variables ---------------------------------------------------------*/ 00045 CanRxMsg RxMessage = {0}; 00046 extern uint8_t KeyNumber; 00047 00048 /* Private function prototypes -----------------------------------------------*/ 00049 /* Private functions ---------------------------------------------------------*/ 00050 00051 /******************************************************************************/ 00052 /* Cortex-M0 Processor Exceptions Handlers */ 00053 /******************************************************************************/ 00054 00055 /** 00056 * @brief This function handles NMI exception. 00057 * @param None 00058 * @retval None 00059 */ 00060 void NMI_Handler(void) 00061 { 00062 } 00063 00064 /** 00065 * @brief This function handles Hard Fault exception. 00066 * @param None 00067 * @retval None 00068 */ 00069 void HardFault_Handler(void) 00070 { 00071 /* Go to infinite loop when Hard Fault exception occurs */ 00072 while (1) 00073 { 00074 } 00075 } 00076 00077 /** 00078 * @brief This function handles Memory Manage exception. 00079 * @param None 00080 * @retval None 00081 */ 00082 void MemManage_Handler(void) 00083 { 00084 /* Go to infinite loop when Memory Manage exception occurs */ 00085 while (1) 00086 { 00087 } 00088 } 00089 00090 /** 00091 * @brief This function handles Bus Fault exception. 00092 * @param None 00093 * @retval None 00094 */ 00095 void BusFault_Handler(void) 00096 { 00097 /* Go to infinite loop when Bus Fault exception occurs */ 00098 while (1) 00099 { 00100 } 00101 } 00102 00103 /** 00104 * @brief This function handles Usage Fault exception. 00105 * @param None 00106 * @retval None 00107 */ 00108 void UsageFault_Handler(void) 00109 { 00110 /* Go to infinite loop when Usage Fault exception occurs */ 00111 while (1) 00112 { 00113 } 00114 } 00115 00116 /** 00117 * @brief This function handles SVCall exception. 00118 * @param None 00119 * @retval None 00120 */ 00121 void SVC_Handler(void) 00122 { 00123 } 00124 00125 /** 00126 * @brief This function handles Debug Monitor exception. 00127 * @param None 00128 * @retval None 00129 */ 00130 void DebugMon_Handler(void) 00131 { 00132 } 00133 00134 /** 00135 * @brief This function handles PendSVC exception. 00136 * @param None 00137 * @retval None 00138 */ 00139 void PendSV_Handler(void) 00140 { 00141 } 00142 00143 /** 00144 * @brief This function handles SysTick Handler. 00145 * @param None 00146 * @retval None 00147 */ 00148 void SysTick_Handler(void) 00149 { 00150 } 00151 00152 /******************************************************************************/ 00153 /* STM32F0xx Peripherals Interrupt Handlers */ 00154 /* Add here the Interrupt Handler for the used peripheral(s) (PPP), for the */ 00155 /* available peripheral interrupt handler's name please refer to the startup */ 00156 /* file (startup_stm32f0xx.s). */ 00157 /******************************************************************************/ 00158 /** 00159 * @brief This function handles CAN1 RX0 request. 00160 * @param None 00161 * @retval None 00162 */ 00163 void CEC_CAN_IRQHandler(void) 00164 { 00165 CAN_Receive(CANx, CAN_FIFO0, &RxMessage); 00166 00167 if ((RxMessage.StdId == 0x321)&&(RxMessage.IDE == CAN_ID_STD) && (RxMessage.DLC == 1)) 00168 { 00169 LED_Display(RxMessage.Data[0]); 00170 KeyNumber = RxMessage.Data[0]; 00171 } 00172 } 00173 00174 /** 00175 * @brief This function handles PPP interrupt request. 00176 * @param None 00177 * @retval None 00178 */ 00179 /*void PPP_IRQHandler(void) 00180 { 00181 }*/ 00182 00183 /** 00184 * @} 00185 */ 00186 00187 /** 00188 * @} 00189 */ 00190 00191 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/