OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [rtos/] [freertos-6.1.1/] [Demo/] [CORTEX_STM32F103_Primer_GCC/] [ST_Code/] [stm32f10x_circle_it.c] - Blame information for rev 582

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 582 jeremybenn
/********************* (C) COPYRIGHT 2007 RAISONANCE S.A.S. *******************/
2
/**
3
*
4
* @file     stm32f10x_circle_it.c
5
* @brief    Interrupt handler for the CircleOS project.
6
* @author   FL
7
* @author   IB
8
* @date     07/2007
9
*
10
**/
11
/******************************************************************************/
12
 
13
/* Includes ------------------------------------------------------------------*/
14
#include "circle.h"
15
 
16
/* External variables --------------------------------------------------------*/
17
extern u16 CCR_Val;
18
extern u16 Current_CCR_BackLightStart;
19
 
20
/*******************************************************************************
21
*
22
*                                NMIException
23
*
24
*******************************************************************************/
25
/**
26
*
27
*  Handles the NMI exception.
28
*
29
**/
30
/******************************************************************************/
31
void NMIException( void ) {}
32
 
33
/*******************************************************************************
34
*
35
*                                HardFaultException
36
*
37
*******************************************************************************/
38
/**
39
*
40
*  Handles the Hard Fault exception.
41
*
42
**/
43
/******************************************************************************/
44
void HardFaultException( void )
45
   {
46
   #ifdef TIMING_ANALYSIS     //to debug with a scope
47
   GPIO_WriteBit( GPIOA, GPIO_Pin_5, Bit_RESET );
48
   GPIO_WriteBit( GPIOA, GPIO_Pin_5, Bit_SET );
49
   #endif
50
   }
51
 
52
/*******************************************************************************
53
*
54
*                                MemManageException
55
*
56
*******************************************************************************/
57
/**
58
*
59
*  Handles the Memory Manage exception.
60
*
61
**/
62
/******************************************************************************/
63
void MemManageException( void ) {}
64
 
65
/*******************************************************************************
66
*
67
*                                BusFaultException
68
*
69
*******************************************************************************/
70
/**
71
*
72
*  Handles the Bus Fault exception.
73
*
74
**/
75
/******************************************************************************/
76
void BusFaultException( void ) {}
77
 
78
/*******************************************************************************
79
*
80
*                                UsageFaultException
81
*
82
*******************************************************************************/
83
/**
84
*
85
*  Handles the Usage Fault exception.
86
*
87
**/
88
/******************************************************************************/
89
void UsageFaultException( void ) {}
90
 
91
/*******************************************************************************
92
*
93
*                                DebugMonitor
94
*
95
*******************************************************************************/
96
/**
97
*
98
*  Handles the  Debug Monitor exception.
99
*
100
**/
101
/******************************************************************************/
102
void DebugMonitor( void ) {}
103
 
104
/*******************************************************************************
105
*
106
*                                SVCHandler
107
*
108
*******************************************************************************/
109
/**
110
*
111
*  Handles the SVCall exception.
112
*
113
**/
114
/******************************************************************************/
115
void SVCHandler( void ) {}
116
 
117
/*******************************************************************************
118
*
119
*                                PendSVC
120
*
121
*******************************************************************************/
122
/**
123
*
124
*  Handles the PendSVC exception.
125
*
126
**/
127
/******************************************************************************/
128
void PendSVC( void ) {}
129
 
130
/*******************************************************************************
131
*
132
*                                DummyHandler
133
*
134
*******************************************************************************/
135
/**
136
*
137
*  Default handling for the IRQ-Exception
138
*
139
**/
140
/******************************************************************************/
141
void DummyHandler ( void ) {}
142
 
143
/*******************************************************************************
144
*
145
*                                TIM2_IRQHandler
146
*
147
*******************************************************************************/
148
/**
149
*
150
*  Handles the TIM2 global interrupt request.
151
*
152
**/
153
/******************************************************************************/
154
void TIM2_IRQHandler( void )
155
   {
156
   #ifdef TIMING_ANALYSIS     //to debug with a scope
157
   GPIO_WriteBit( GPIOA, GPIO_Pin_7, Bit_RESET );
158
   #endif
159
 
160
   /* Clear TIM2 update interrupt */
161
   TIM_ClearITPendingBit( TIM2, TIM_IT_Update );
162
 
163
   MEMS_Handler();
164
 
165
   #ifdef TIMING_ANALYSIS     //to debug with a scope
166
   GPIO_WriteBit( GPIOA, GPIO_Pin_7, Bit_SET );
167
   #endif
168
   }
169
 
170
/*******************************************************************************
171
*
172
*                                TIM3_IRQHandler
173
*
174
*******************************************************************************/
175
/**
176
*
177
*  Handles the TIM3 global interrupt request.
178
*
179
**/
180
/******************************************************************************/
181
void TIM3_IRQHandler( void )
182
{
183
   u16 capture = 0;
184
 
185
   if( TIM_GetITStatus( TIM3, TIM_IT_CC3 ) != RESET )
186
      {
187
      capture = TIM_GetCapture3( TIM3 );
188
 
189
      TIM_SetCompare3( TIM3, capture + CCR_Val + 1 );
190
      TIM_ClearITPendingBit( TIM3, TIM_IT_CC3 );
191
   }
192
}
193
 
194
/*******************************************************************************
195
*
196
*                                TIM4_IRQHandler
197
*
198
*******************************************************************************/
199
/**
200
*
201
*  Handles the TIM4 global interrupt request.
202
*
203
**/
204
/******************************************************************************/
205
void TIM4_IRQHandler( void )
206
{
207
   u16 BackLight_capture = 0;
208
 
209
   if( TIM_GetITStatus( TIM4, TIM_IT_CC2 ) != RESET )
210
      {
211
      BackLight_capture = TIM_GetCapture2( TIM4 );
212
 
213
      TIM_SetCompare2( TIM4, BackLight_capture + Current_CCR_BackLightStart + 1 );
214
      TIM_ClearITPendingBit( TIM4, TIM_IT_CC2 );
215
  }
216
}
217
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.