comparison libs/STM32F10x_StdPeriph_Lib_V3.5.0/Project/STM32F10x_StdPeriph_Examples/EXTI/EXTI_Config/stm32f10x_it.c @ 0:c59513fd84fb

Initial commit of STM32 test code.
author Daniel O'Connor <darius@dons.net.au>
date Mon, 03 Oct 2011 21:19:15 +1030
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:c59513fd84fb
1 /**
2 ******************************************************************************
3 * @file EXTI/EXTI_Config/stm32f10x_it.c
4 * @author MCD Application Team
5 * @version V3.5.0
6 * @date 08-April-2011
7 * @brief Main Interrupt Service Routines.
8 * This file provides template for all exceptions handler and peripherals
9 * interrupt service routine.
10 ******************************************************************************
11 * @attention
12 *
13 * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
14 * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
15 * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
16 * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
17 * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
18 * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
19 *
20 * <h2><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h2>
21 ******************************************************************************
22 */
23
24 /* Includes ------------------------------------------------------------------*/
25 #include "stm32f10x_it.h"
26 #include "stm32_eval.h"
27
28 /** @addtogroup STM32F10x_StdPeriph_Examples
29 * @{
30 */
31
32 /** @addtogroup EXTI_Config
33 * @{
34 */
35
36 /* Private typedef -----------------------------------------------------------*/
37 /* Private define ------------------------------------------------------------*/
38 /* Private macro -------------------------------------------------------------*/
39 /* Private variables ---------------------------------------------------------*/
40 /* Private function prototypes -----------------------------------------------*/
41 /* Private functions ---------------------------------------------------------*/
42
43 /******************************************************************************/
44 /* Cortex-M3 Processor Exceptions Handlers */
45 /******************************************************************************/
46
47 /**
48 * @brief This function handles NMI exception.
49 * @param None
50 * @retval None
51 */
52 void NMI_Handler(void)
53 {
54 }
55
56 /**
57 * @brief This function handles Hard Fault exception.
58 * @param None
59 * @retval None
60 */
61 void HardFault_Handler(void)
62 {
63 /* Go to infinite loop when Hard Fault exception occurs */
64 while (1)
65 {
66 }
67 }
68
69 /**
70 * @brief This function handles Memory Manage exception.
71 * @param None
72 * @retval None
73 */
74 void MemManage_Handler(void)
75 {
76 /* Go to infinite loop when Memory Manage exception occurs */
77 while (1)
78 {
79 }
80 }
81
82 /**
83 * @brief This function handles Bus Fault exception.
84 * @param None
85 * @retval None
86 */
87 void BusFault_Handler(void)
88 {
89 /* Go to infinite loop when Bus Fault exception occurs */
90 while (1)
91 {
92 }
93 }
94
95 /**
96 * @brief This function handles Usage Fault exception.
97 * @param None
98 * @retval None
99 */
100 void UsageFault_Handler(void)
101 {
102 /* Go to infinite loop when Usage Fault exception occurs */
103 while (1)
104 {
105 }
106 }
107
108 /**
109 * @brief This function handles SVCall exception.
110 * @param None
111 * @retval None
112 */
113 void SVC_Handler(void)
114 {
115 }
116
117 /**
118 * @brief This function handles Debug Monitor exception.
119 * @param None
120 * @retval None
121 */
122 void DebugMon_Handler(void)
123 {
124 }
125
126 /**
127 * @brief This function handles PendSV_Handler exception.
128 * @param None
129 * @retval None
130 */
131 void PendSV_Handler(void)
132 {
133 }
134
135 /**
136 * @brief This function handles SysTick Handler.
137 * @param None
138 * @retval None
139 */
140 void SysTick_Handler(void)
141 {
142 }
143
144 /******************************************************************************/
145 /* STM32F10x Peripherals Interrupt Handlers */
146 /******************************************************************************/
147
148 /**
149 * @brief This function handles External line 0 interrupt request.
150 * @param None
151 * @retval None
152 */
153 void EXTI0_IRQHandler(void)
154 {
155 if(EXTI_GetITStatus(EXTI_Line0) != RESET)
156 {
157 /* Toggle LED1 */
158 STM_EVAL_LEDToggle(LED1);
159
160 /* Clear the EXTI line 0 pending bit */
161 EXTI_ClearITPendingBit(EXTI_Line0);
162 }
163 }
164
165 /**
166 * @brief This function handles External lines 9 to 5 interrupt request.
167 * @param None
168 * @retval None
169 */
170 void EXTI9_5_IRQHandler(void)
171 {
172 #if defined (STM32F10X_HD_VL) || defined (STM32F10X_HD) || defined (STM32F10X_XL)
173 if(EXTI_GetITStatus(EXTI_Line8) != RESET)
174 {
175 /* Toggle LED2 */
176 STM_EVAL_LEDToggle(LED2);
177
178 /* Clear the EXTI line 8 pending bit */
179 EXTI_ClearITPendingBit(EXTI_Line8);
180 }
181 #else
182 if(EXTI_GetITStatus(EXTI_Line9) != RESET)
183 {
184 /* Toggle LED2 */
185 STM_EVAL_LEDToggle(LED2);
186
187 /* Clear the EXTI line 9 pending bit */
188 EXTI_ClearITPendingBit(EXTI_Line9);
189 }
190 #endif
191 }
192
193 /******************************************************************************/
194 /* STM32F10x Peripherals Interrupt Handlers */
195 /* Add here the Interrupt Handler for the used peripheral(s) (PPP), for the */
196 /* available peripheral interrupt handler's name please refer to the startup */
197 /* file (startup_stm32f10x_xx.s). */
198 /******************************************************************************/
199
200 /**
201 * @brief This function handles PPP interrupt request.
202 * @param None
203 * @retval None
204 */
205 /*void PPP_IRQHandler(void)
206 {
207 }*/
208
209 /**
210 * @}
211 */
212
213 /**
214 * @}
215 */
216
217 /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/