STM32F0xx Standard Peripherals Firmware Library: stm32f0xx_it.c Source File

STM32F0xx Standard Peripherals Library

STM32F0xx_StdPeriph_Examples/EXTI/EXTI_Example/stm32f0xx_it.c
Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   * @file    EXTI/EXTI_Example/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>&copy; 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 EXTI_Example
00038   * @{
00039   */
00040 
00041 /* Private typedef -----------------------------------------------------------*/
00042 /* Private define ------------------------------------------------------------*/
00043 /* Private macro -------------------------------------------------------------*/
00044 /* Private variables ---------------------------------------------------------*/
00045 /* Private function prototypes -----------------------------------------------*/
00046 /* Private functions ---------------------------------------------------------*/
00047 
00048 /******************************************************************************/
00049 /*            Cortex-M0 Processor Exceptions Handlers                         */
00050 /******************************************************************************/
00051 
00052 /**
00053   * @brief  This function handles NMI exception.
00054   * @param  None
00055   * @retval None
00056   */
00057 void NMI_Handler(void)
00058 {
00059 }
00060 
00061 /**
00062   * @brief  This function handles Hard Fault exception.
00063   * @param  None
00064   * @retval None
00065   */
00066 void HardFault_Handler(void)
00067 {
00068   /* Go to infinite loop when Hard Fault exception occurs */
00069   while (1)
00070   {
00071   }
00072 }
00073 
00074 /**
00075   * @brief  This function handles SVCall exception.
00076   * @param  None
00077   * @retval None
00078   */
00079 void SVC_Handler(void)
00080 {
00081 }
00082 
00083 /**
00084   * @brief  This function handles PendSVC exception.
00085   * @param  None
00086   * @retval None
00087   */
00088 void PendSV_Handler(void)
00089 {
00090 }
00091 
00092 /**
00093   * @brief  This function handles SysTick Handler.
00094   * @param  None
00095   * @retval None
00096   */
00097 void SysTick_Handler(void)
00098 {
00099 }
00100 
00101 /******************************************************************************/
00102 /*                 STM32F0xx Peripherals Interrupt Handlers                   */
00103 /*  Add here the Interrupt Handler for the used peripheral(s) (PPP), for the  */
00104 /*  available peripheral interrupt handler's name please refer to the startup */
00105 /*  file (startup_stm32f0xx.s).                                               */
00106 /******************************************************************************/
00107 
00108 /**
00109   * @brief  This function handles External line 0 to 1 interrupt request.
00110   * @param  None
00111   * @retval None
00112   */
00113 void EXTI0_1_IRQHandler(void)
00114 {
00115   if(EXTI_GetITStatus(EXTI_Line0) != RESET)
00116   {
00117     /* Toggle LED2 */
00118     STM_EVAL_LEDToggle(LED2);
00119 
00120     /* Clear the EXTI line 0 pending bit */
00121     EXTI_ClearITPendingBit(EXTI_Line0);
00122   }
00123 }
00124 
00125 /**
00126   * @brief  This function handles External line 2 to 3 interrupt request.
00127   * @param  None
00128   * @retval None
00129   */
00130 #ifdef USE_STM32072B_EVAL 
00131 void EXTI2_3_IRQHandler(void)
00132 {
00133   if(EXTI_GetITStatus(EXTI_Line3) != RESET)
00134   {
00135     /* Toggle LED1 */
00136     STM_EVAL_LEDToggle(LED1);
00137     
00138     /* Clear the EXTI line 3 pending bit */
00139     EXTI_ClearITPendingBit(EXTI_Line3);
00140   }
00141   
00142   if(EXTI_GetITStatus(EXTI_Line2) != RESET)
00143   {
00144     /* Toggle LED3 */
00145     STM_EVAL_LEDToggle(LED3);
00146 
00147     /* Clear the EXTI line 2 pending bit */
00148     EXTI_ClearITPendingBit(EXTI_Line2);
00149   }
00150 }
00151 #endif
00152 
00153 /**
00154   * @brief  This function handles External lines 4 to 15 interrupt request.
00155   * @param  None
00156   * @retval None
00157   */
00158 void EXTI4_15_IRQHandler(void)
00159 {
00160   if(EXTI_GetITStatus(EXTI_Line8) != RESET)
00161   {
00162     /* Toggle LED1 */
00163     STM_EVAL_LEDToggle(LED1);
00164     
00165     /* Clear the EXTI line 8 pending bit */
00166     EXTI_ClearITPendingBit(EXTI_Line8);
00167   }
00168   
00169   if(EXTI_GetITStatus(EXTI_Line13) != RESET)
00170   {
00171     /* Toggle LED4 */
00172     STM_EVAL_LEDToggle(LED4);
00173 
00174     /* Clear the EXTI line 13 pending bit */
00175     EXTI_ClearITPendingBit(EXTI_Line13);
00176   }
00177 
00178 #ifdef USE_STM320518_EVAL
00179   if(EXTI_GetITStatus(EXTI_Line9) != RESET)
00180   {
00181     /* Toggle LED4 */
00182     STM_EVAL_LEDToggle(LED3);
00183 
00184     /* Clear the EXTI line 13 pending bit */
00185     EXTI_ClearITPendingBit(EXTI_Line9);
00186   }
00187 #endif
00188   
00189 }
00190 
00191 /**
00192   * @brief  This function handles PPP interrupt request.
00193   * @param  None
00194   * @retval None
00195   */
00196 /*void PPP_IRQHandler(void)
00197 {
00198 }*/
00199 
00200 /**
00201   * @}
00202   */
00203 
00204 /**
00205   * @}
00206   */
00207 
00208 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
STM32L1xx Standard Peripherals Library: Footer

 

 

 For complete documentation on STM32 Microcontrollers visit www.st.com/STM32