Subversion Repositories NaviCtrl

Rev

Rev 72 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 72 Rev 171
1
/*#######################################################################################*/
1
/*#######################################################################################*/
2
/* !!! THIS IS NOT FREE SOFTWARE !!!                                                     */
2
/* !!! THIS IS NOT FREE SOFTWARE !!!                                                     */
3
/*#######################################################################################*/
3
/*#######################################################################################*/
4
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
4
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
5
// + Copyright (c) 2008 Ingo Busker, Holger Buss
5
// + Copyright (c) 2008 Ingo Busker, Holger Buss
6
// + Nur für den privaten Gebrauch
6
// + Nur für den privaten Gebrauch / NON-COMMERCIAL USE ONLY
7
// + FOR NON COMMERCIAL USE ONLY
7
// + FOR NON COMMERCIAL USE ONLY
8
// + www.MikroKopter.com
8
// + www.MikroKopter.com
9
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
9
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
10
// + Es gilt für das gesamte Projekt (Hardware, Software, Binärfiles, Sourcecode und Dokumentation), 
10
// + Es gilt für das gesamte Projekt (Hardware, Software, Binärfiles, Sourcecode und Dokumentation), 
11
// + dass eine Nutzung (auch auszugsweise) nur für den privaten (nicht-kommerziellen) Gebrauch zulässig ist. 
11
// + dass eine Nutzung (auch auszugsweise) nur für den privaten (nicht-kommerziellen) Gebrauch zulässig ist. 
12
// + Sollten direkte oder indirekte kommerzielle Absichten verfolgt werden, ist mit uns (info@mikrokopter.de) Kontakt 
12
// + Sollten direkte oder indirekte kommerzielle Absichten verfolgt werden, ist mit uns (info@mikrokopter.de) Kontakt 
13
// + bzgl. der Nutzungsbedingungen aufzunehmen. 
13
// + bzgl. der Nutzungsbedingungen aufzunehmen. 
14
// + Eine kommerzielle Nutzung ist z.B.Verkauf von MikroKoptern, Bestückung und Verkauf von Platinen oder Bausätzen,
14
// + Eine kommerzielle Nutzung ist z.B.Verkauf von MikroKoptern, Bestückung und Verkauf von Platinen oder Bausätzen,
15
// + Verkauf von Luftbildaufnahmen, usw.
15
// + Verkauf von Luftbildaufnahmen, usw.
16
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
16
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
17
// + Werden Teile des Quellcodes (mit oder ohne Modifikation) weiterverwendet oder veröffentlicht, 
17
// + Werden Teile des Quellcodes (mit oder ohne Modifikation) weiterverwendet oder veröffentlicht, 
18
// + unterliegen sie auch diesen Nutzungsbedingungen und diese Nutzungsbedingungen incl. Copyright müssen dann beiliegen
18
// + unterliegen sie auch diesen Nutzungsbedingungen und diese Nutzungsbedingungen incl. Copyright müssen dann beiliegen
19
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
19
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
20
// + Sollte die Software (auch auszugesweise) oder sonstige Informationen des MikroKopter-Projekts
20
// + Sollte die Software (auch auszugesweise) oder sonstige Informationen des MikroKopter-Projekts
21
// + auf anderen Webseiten oder sonstigen Medien veröffentlicht werden, muss unsere Webseite "http://www.mikrokopter.de"
21
// + auf anderen Webseiten oder sonstigen Medien veröffentlicht werden, muss unsere Webseite "http://www.mikrokopter.de"
22
// + eindeutig als Ursprung verlinkt werden
22
// + eindeutig als Ursprung verlinkt werden
23
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
23
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
24
// + Keine Gewähr auf Fehlerfreiheit, Vollständigkeit oder Funktion
24
// + Keine Gewähr auf Fehlerfreiheit, Vollständigkeit oder Funktion
25
// + Benutzung auf eigene Gefahr
25
// + Benutzung auf eigene Gefahr
26
// + Wir übernehmen keinerlei Haftung für direkte oder indirekte Personen- oder Sachschäden
26
// + Wir übernehmen keinerlei Haftung für direkte oder indirekte Personen- oder Sachschäden
27
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
27
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
28
// + Die PORTIERUNG der Software (oder Teile davon) auf andere Systeme (ausser der Hardware von www.mikrokopter.de) ist nur 
28
// + Die Portierung oder Nutzung der Software (oder Teile davon) auf andere Systeme (ausser der Hardware von www.mikrokopter.de) ist nur 
29
// + mit unserer Zustimmung zulässig
29
// + mit unserer Zustimmung zulässig
30
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
30
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
31
// + Die Funktion printf_P() unterliegt ihrer eigenen Lizenz und ist hiervon nicht betroffen
31
// + Die Funktion printf_P() unterliegt ihrer eigenen Lizenz und ist hiervon nicht betroffen
32
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
32
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
33
// + Redistributions of source code (with or without modifications) must retain the above copyright notice, 
33
// + Redistributions of source code (with or without modifications) must retain the above copyright notice, 
34
// + this list of conditions and the following disclaimer.
34
// + this list of conditions and the following disclaimer.
35
// +   * Neither the name of the copyright holders nor the names of contributors may be used to endorse or promote products derived
35
// +   * Neither the name of the copyright holders nor the names of contributors may be used to endorse or promote products derived
36
// +     from this software without specific prior written permission.
36
// +     from this software without specific prior written permission.
37
// +   * The use of this project (hardware, software, binary files, sources and documentation) is only permitted 
37
// +   * The use of this project (hardware, software, binary files, sources and documentation) is only permitted 
38
// +     for non-commercial use (directly or indirectly)
38
// +     for non-commercial use (directly or indirectly)
39
// +     Commercial use (for excample: selling of MikroKopters, selling of PCBs, assembly, ...) is only permitted 
39
// +     Commercial use (for excample: selling of MikroKopters, selling of PCBs, assembly, ...) is only permitted 
40
// +     with our written permission
40
// +     with our written permission
41
// +   * If sources or documentations are redistributet on other webpages, out webpage (http://www.MikroKopter.de) must be 
41
// +   * If sources or documentations are redistributet on other webpages, out webpage (http://www.MikroKopter.de) must be 
42
// +     clearly linked as origin 
42
// +     clearly linked as origin 
43
// +   * PORTING this software (or part of it) to systems (other than hardware from www.mikrokopter.de) is NOT allowed
43
// +   * porting the sources to other systems or using the software on other systems (except hardware from www.mikrokopter.de) is not allowed
44
//
44
//
45
// +  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
45
// +  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
46
// +  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
46
// +  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
47
// +  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
47
// +  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
48
// +  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
48
// +  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
49
// +  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
49
// +  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
50
// +  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
50
// +  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
51
// +  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
51
// +  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
52
// +  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
52
// +  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
53
// +  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
53
// +  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
54
// +  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
54
// +  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
55
// +  POSSIBILITY OF SUCH DAMAGE. 
55
// +  POSSIBILITY OF SUCH DAMAGE. 
56
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
56
// ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
57
#include "91x_lib.h"
57
#include "91x_lib.h"
58
#include "usb_lib.h"
58
#include "usb_lib.h"
59
#include "fat16.h"
59
#include "fat16.h"
60
#include "main.h"
60
#include "main.h"
61
#include "uart1.h"
61
#include "uart1.h"
62
#define global extern   /* to declare external variables and functions      */
62
#define global extern   /* to declare external variables and functions      */
63
 
63
 
64
extern void USB_Istr(void);
64
extern void USB_Istr(void);
65
 
65
 
66
void SWI_Handler (void)       __attribute__ ((interrupt ("SWI")));
66
void SWI_Handler (void)       __attribute__ ((interrupt ("SWI")));
67
void Prefetch_Handler (void)  __attribute__ ((interrupt ("ABORT")));
67
void Prefetch_Handler (void)  __attribute__ ((interrupt ("ABORT")));
68
void Abort_Handler (void)     __attribute__ ((interrupt ("ABORT")));
68
void Abort_Handler (void)     __attribute__ ((interrupt ("ABORT")));
69
void Undefined_Handler (void) __attribute__ ((interrupt ("UNDEF")));
69
void Undefined_Handler (void) __attribute__ ((interrupt ("UNDEF")));
70
void FIQ_Handler (void)       __attribute__ ((interrupt ("FIQ")));
70
void FIQ_Handler (void)       __attribute__ ((interrupt ("FIQ")));
71
 
71
 
72
void Dummy_Handler(void)
72
void Dummy_Handler(void)
73
{
73
{
74
        VIC0->VAR = 0xFF;
74
        VIC0->VAR = 0xFF;
75
        VIC1->VAR = 0xFF;
75
        VIC1->VAR = 0xFF;
76
}
76
}
77
 
77
 
78
/* avoid the surprising reset-like behaviour by spurious interrupts */
78
/* avoid the surprising reset-like behaviour by spurious interrupts */
79
void Interrupt_Init(void)
79
void Interrupt_Init(void)
80
{
80
{
81
  VIC0->DVAR = (u32)Dummy_Handler;
81
  VIC0->DVAR = (u32)Dummy_Handler;
82
  VIC1->DVAR = (u32)Dummy_Handler;
82
  VIC1->DVAR = (u32)Dummy_Handler;
83
}
83
}
84
/*******************************************************************************
84
/*******************************************************************************
85
* Function Name  : SWI_Handler
85
* Function Name  : SWI_Handler
86
* Description    : This function handles SW exception.
86
* Description    : This function handles SW exception.
87
* Input          : None
87
* Input          : None
88
* Output         : None
88
* Output         : None
89
* Return         : None
89
* Return         : None
90
*******************************************************************************/
90
*******************************************************************************/
91
void SWI_Handler (void)
91
void SWI_Handler (void)
92
{
92
{
93
}
93
}
94
               
94
               
95
/*******************************************************************************
95
/*******************************************************************************
96
* Function Name  : Abort_Handler
96
* Function Name  : Abort_Handler
97
* Description    : This function handles data abort exception.
97
* Description    : This function handles data abort exception.
98
* Input          : None
98
* Input          : None
99
* Output         : None
99
* Output         : None
100
* Return         : None
100
* Return         : None
101
*******************************************************************************/
101
*******************************************************************************/
102
void Abort_Handler (void)
102
void Abort_Handler (void)
103
{
103
{
104
        SerialPutString("\r\nAbort Handler");
104
        SerialPutString("\r\nAbort Handler");
105
        while(1)
105
        while(1)
106
        {
106
        {
107
        // infinite loop
107
        // infinite loop
108
        }
108
        }
109
}
109
}
110
 
110
 
111
/*******************************************************************************
111
/*******************************************************************************
112
* Function Name  : Undefined_Handler
112
* Function Name  : Undefined_Handler
113
* Description    : This function handles undefined instruction exception.
113
* Description    : This function handles undefined instruction exception.
114
* Input          : None
114
* Input          : None
115
* Output         : None
115
* Output         : None
116
* Return         : None
116
* Return         : None
117
*******************************************************************************/
117
*******************************************************************************/
118
void Undefined_Handler (void)
118
void Undefined_Handler (void)
119
{
119
{
120
        SerialPutString("\r\nUndefined Handler");
120
        SerialPutString("\r\nUndefined Handler");
121
        while(1)
121
        while(1)
122
        {
122
        {
123
        // infinite loop
123
        // infinite loop
124
        }
124
        }
125
}
125
}
126
/*******************************************************************************
126
/*******************************************************************************
127
* Function Name  : FIQ_Handler
127
* Function Name  : FIQ_Handler
128
* Description    : This function handles FIQ exception.
128
* Description    : This function handles FIQ exception.
129
* Input          : None
129
* Input          : None
130
* Output         : None
130
* Output         : None
131
* Return         : None
131
* Return         : None
132
*******************************************************************************/
132
*******************************************************************************/
133
void FIQ_Handler (void)
133
void FIQ_Handler (void)
134
{
134
{
135
}
135
}
136
/*******************************************************************************
136
/*******************************************************************************
137
* Function Name  : Prefetch_Handler
137
* Function Name  : Prefetch_Handler
138
* Description    : This function handles preftetch abort exception.
138
* Description    : This function handles preftetch abort exception.
139
*******************************************************************************/
139
*******************************************************************************/
140
void Prefetch_Handler(void)
140
void Prefetch_Handler(void)
141
{
141
{
142
        SerialPutString("\r\nPrefetch Handler");
142
        SerialPutString("\r\nPrefetch Handler");
143
        while(1)
143
        while(1)
144
        {
144
        {
145
        // infinite loop
145
        // infinite loop
146
        }
146
        }
147
}
147
}
148
/*******************************************************************************
148
/*******************************************************************************
149
* Function Name  : WDG_IRQHandler
149
* Function Name  : WDG_IRQHandler
150
* Description    : This function handles the WDG interrupt request
150
* Description    : This function handles the WDG interrupt request
151
*******************************************************************************/
151
*******************************************************************************/
152
void WDG_IRQHandler(void)
152
void WDG_IRQHandler(void)
153
{
153
{
154
   /*write your handler here*/
154
   /*write your handler here*/
155
   /* ... */
155
   /* ... */
156
           
156
           
157
   
157
   
158
   /*write any value to VIC0 VAR*/  
158
   /*write any value to VIC0 VAR*/  
159
   VIC0->VAR = 0xFF;
159
   VIC0->VAR = 0xFF;
160
}
160
}
161
/*******************************************************************************
161
/*******************************************************************************
162
* Function Name  : SW_IRQHandler
162
* Function Name  : SW_IRQHandler
163
* Description    : This function handles the SW interrupt request
163
* Description    : This function handles the SW interrupt request
164
*******************************************************************************/
164
*******************************************************************************/
165
void SW_IRQHandler(void)
165
void SW_IRQHandler(void)
166
{
166
{
167
        /*write your handler here*/
167
        /*write your handler here*/
168
        /* ... */
168
        /* ... */
169
       
169
       
170
       
170
       
171
        /*write any value to VIC0 VAR*/  
171
        /*write any value to VIC0 VAR*/  
172
        VIC0->VAR = 0xFF;
172
        VIC0->VAR = 0xFF;
173
}
173
}
174
/*******************************************************************************
174
/*******************************************************************************
175
* Function Name  : ARMRX_IRQHandler
175
* Function Name  : ARMRX_IRQHandler
176
* Description    : This function handles the ARMRX interrupt request
176
* Description    : This function handles the ARMRX interrupt request
177
*******************************************************************************/
177
*******************************************************************************/
178
void ARMRX_IRQHandler(void)
178
void ARMRX_IRQHandler(void)
179
{
179
{
180
        /*write your handler here*/
180
        /*write your handler here*/
181
        /* ... */
181
        /* ... */
182
               
182
               
183
       
183
       
184
        /*write any value to VIC0 VAR*/  
184
        /*write any value to VIC0 VAR*/  
185
        VIC0->VAR = 0xFF;
185
        VIC0->VAR = 0xFF;
186
}
186
}
187
/*******************************************************************************
187
/*******************************************************************************
188
* Function Name  : ARMTX_IRQHandler
188
* Function Name  : ARMTX_IRQHandler
189
* Description    : This function handles the ARMTX interrupt request
189
* Description    : This function handles the ARMTX interrupt request
190
*******************************************************************************/
190
*******************************************************************************/
191
void ARMTX_IRQHandler(void)
191
void ARMTX_IRQHandler(void)
192
{
192
{
193
        /*write your handler here*/
193
        /*write your handler here*/
194
        /* ... */
194
        /* ... */
195
           
195
           
196
       
196
       
197
        /*write any value to VIC0 VAR*/  
197
        /*write any value to VIC0 VAR*/  
198
        VIC0->VAR = 0xFF;
198
        VIC0->VAR = 0xFF;
199
}
199
}
200
/*******************************************************************************
200
/*******************************************************************************
201
* Function Name  : TIM0_IRQHandler
201
* Function Name  : TIM0_IRQHandler
202
* Description    : This function handles the TIM0 interrupt request
202
* Description    : This function handles the TIM0 interrupt request
203
*******************************************************************************/
203
*******************************************************************************/
204
void TIM0_IRQHandler(void)
204
void TIM0_IRQHandler(void)
205
{
205
{
206
        /*write your handler here*/
206
        /*write your handler here*/
207
        /* ... */
207
        /* ... */
208
               
208
               
209
       
209
       
210
        /*write any value to VIC0 VAR*/  
210
        /*write any value to VIC0 VAR*/  
211
        VIC0->VAR = 0xFF;
211
        VIC0->VAR = 0xFF;
212
}
212
}
213
/*******************************************************************************
213
/*******************************************************************************
214
* Function Name  : TIM1_IRQHandler
214
* Function Name  : TIM1_IRQHandler
215
* Description    : This function handles the TIM1 interrupt request
215
* Description    : This function handles the TIM1 interrupt request
216
*******************************************************************************/
216
*******************************************************************************/
217
/*
217
/*
218
void TIM1_IRQHandler(void)
218
void TIM1_IRQHandler(void)
219
{
219
{
220
   // write any value to VIC0 VAR //  
220
   // write any value to VIC0 VAR //  
221
   VIC0->VAR = 0xFF;
221
   VIC0->VAR = 0xFF;
222
}
222
}
223
*/
223
*/
224
/*******************************************************************************
224
/*******************************************************************************
225
* Function Name  : TIM2_IRQHandler
225
* Function Name  : TIM2_IRQHandler
226
* Description    : This function handles the TIM2 interrupt request
226
* Description    : This function handles the TIM2 interrupt request
227
*******************************************************************************/
227
*******************************************************************************/
228
void TIM2_IRQHandler(void)
228
void TIM2_IRQHandler(void)
229
{
229
{
230
        /*write your handler here*/
230
        /*write your handler here*/
231
        /* ... */
231
        /* ... */
232
               
232
               
233
       
233
       
234
        /*write any value to VIC0 VAR*/  
234
        /*write any value to VIC0 VAR*/  
235
        VIC0->VAR = 0xFF;
235
        VIC0->VAR = 0xFF;
236
}
236
}
237
/*******************************************************************************
237
/*******************************************************************************
238
* Function Name  : TIM3_IRQHandler
238
* Function Name  : TIM3_IRQHandler
239
* Description    : This function handles the TIM3 interrupt request
239
* Description    : This function handles the TIM3 interrupt request
240
*******************************************************************************/
240
*******************************************************************************/
241
void TIM3_IRQHandler(void)
241
void TIM3_IRQHandler(void)
242
{
242
{
243
        /*write your handler here*/
243
        /*write your handler here*/
244
        /* ... */
244
        /* ... */
245
               
245
               
246
       
246
       
247
        /*write any value to VIC0 VAR*/  
247
        /*write any value to VIC0 VAR*/  
248
        VIC0->VAR = 0xFF;
248
        VIC0->VAR = 0xFF;
249
}
249
}
250
/*******************************************************************************
250
/*******************************************************************************
251
* Function Name  : USBHP_IRQHandler
251
* Function Name  : USBHP_IRQHandler
252
* Description    : This function handles the USBHP interrupt request
252
* Description    : This function handles the USBHP interrupt request
253
*******************************************************************************/
253
*******************************************************************************/
254
void USBHP_IRQHandler(void)
254
void USBHP_IRQHandler(void)
255
{
255
{
256
        CTR_HP();
256
        CTR_HP();
257
        /*write any value to VIC0 VAR*/  
257
        /*write any value to VIC0 VAR*/  
258
        VIC0->VAR = 0xFF;
258
        VIC0->VAR = 0xFF;
259
}
259
}
260
/*******************************************************************************
260
/*******************************************************************************
261
* Function Name  : USBLP_IRQHandler
261
* Function Name  : USBLP_IRQHandler
262
* Description    : This function handles the USBLP interrupt request
262
* Description    : This function handles the USBLP interrupt request
263
*******************************************************************************/
263
*******************************************************************************/
264
void USBLP_IRQHandler(void)
264
void USBLP_IRQHandler(void)
265
{
265
{
266
        USB_Istr();     /*write any value to VIC0 VAR*/  
266
        USB_Istr();     /*write any value to VIC0 VAR*/  
267
        VIC0->VAR = 0xFF;
267
        VIC0->VAR = 0xFF;
268
}
268
}
269
/*******************************************************************************
269
/*******************************************************************************
270
* Function Name  : SCU_IRQHandler
270
* Function Name  : SCU_IRQHandler
271
* Description    : This function handles the SCU interrupt request
271
* Description    : This function handles the SCU interrupt request
272
*******************************************************************************/
272
*******************************************************************************/
273
void SCU_IRQHandler(void)
273
void SCU_IRQHandler(void)
274
{
274
{
275
        /*write your handler here*/
275
        /*write your handler here*/
276
        /* ... */
276
        /* ... */
277
               
277
               
278
       
278
       
279
        /*write any value to VIC0 VAR*/  
279
        /*write any value to VIC0 VAR*/  
280
        VIC0->VAR = 0xFF;
280
        VIC0->VAR = 0xFF;
281
}
281
}
282
/*******************************************************************************
282
/*******************************************************************************
283
* Function Name  : ENET_IRQHandler
283
* Function Name  : ENET_IRQHandler
284
* Description    : This function handles the DENET interrupt request
284
* Description    : This function handles the DENET interrupt request
285
*******************************************************************************/
285
*******************************************************************************/
286
void ENET_IRQHandler(void)
286
void ENET_IRQHandler(void)
287
{
287
{
288
        /*write your handler here*/
288
        /*write your handler here*/
289
        /* ... */
289
        /* ... */
290
               
290
               
291
       
291
       
292
        /*write any value to VIC0 VAR*/  
292
        /*write any value to VIC0 VAR*/  
293
        VIC0->VAR = 0xFF;
293
        VIC0->VAR = 0xFF;
294
}
294
}
295
/*******************************************************************************
295
/*******************************************************************************
296
* Function Name  : DMA_IRQHandler
296
* Function Name  : DMA_IRQHandler
297
* Description    : This function handles the DMA interrupt request
297
* Description    : This function handles the DMA interrupt request
298
*******************************************************************************/
298
*******************************************************************************/
299
void DMA_IRQHandler(void)
299
void DMA_IRQHandler(void)
300
{
300
{
301
        /*write your handler here*/
301
        /*write your handler here*/
302
        /* ... */
302
        /* ... */
303
               
303
               
304
       
304
       
305
        /*write any value to VIC0 VAR*/  
305
        /*write any value to VIC0 VAR*/  
306
        VIC0->VAR = 0xFF;
306
        VIC0->VAR = 0xFF;
307
}
307
}
308
/*******************************************************************************
308
/*******************************************************************************
309
* Function Name  : CAN_IRQHandler
309
* Function Name  : CAN_IRQHandler
310
* Description    : This function handles the CAN interrupt request
310
* Description    : This function handles the CAN interrupt request
311
*******************************************************************************/
311
*******************************************************************************/
312
void CAN_IRQHandler(void)
312
void CAN_IRQHandler(void)
313
{
313
{
314
        /*write your handler here*/
314
        /*write your handler here*/
315
        /* ... */
315
        /* ... */
316
               
316
               
317
       
317
       
318
        /*write any value to VIC0 VAR*/  
318
        /*write any value to VIC0 VAR*/  
319
        VIC0->VAR = 0xFF;
319
        VIC0->VAR = 0xFF;
320
}
320
}
321
/*******************************************************************************
321
/*******************************************************************************
322
* Function Name  : MC_IRQHandler
322
* Function Name  : MC_IRQHandler
323
* Description    : This function handles the MC interrupt request
323
* Description    : This function handles the MC interrupt request
324
*******************************************************************************/
324
*******************************************************************************/
325
void MC_IRQHandler(void)
325
void MC_IRQHandler(void)
326
{
326
{
327
        /*write your handler here*/
327
        /*write your handler here*/
328
        /* ... */
328
        /* ... */
329
               
329
               
330
       
330
       
331
        /*write any value to VIC0 VAR*/  
331
        /*write any value to VIC0 VAR*/  
332
        VIC0->VAR = 0xFF;
332
        VIC0->VAR = 0xFF;
333
}
333
}
334
/*******************************************************************************
334
/*******************************************************************************
335
* Function Name  : ADC_IRQHandler
335
* Function Name  : ADC_IRQHandler
336
* Description    : This function handles the ADC interrupt request
336
* Description    : This function handles the ADC interrupt request
337
*******************************************************************************/
337
*******************************************************************************/
338
void ADC_IRQHandler(void)
338
void ADC_IRQHandler(void)
339
{
339
{
340
        /*write your handler here*/
340
        /*write your handler here*/
341
        /* ... */
341
        /* ... */
342
               
342
               
343
       
343
       
344
        /*write any value to VIC0 VAR*/  
344
        /*write any value to VIC0 VAR*/  
345
        VIC0->VAR = 0xFF;
345
        VIC0->VAR = 0xFF;
346
}
346
}
347
/*******************************************************************************
347
/*******************************************************************************
348
* Function Name  : UART0_IRQHandler
348
* Function Name  : UART0_IRQHandler
349
* Description    : This function handles the UART0 interrupt request
349
* Description    : This function handles the UART0 interrupt request
350
*******************************************************************************/
350
*******************************************************************************/
351
/*void UART0_IRQHandler(void)
351
/*void UART0_IRQHandler(void)
352
{
352
{
353
} */
353
} */
354
/*******************************************************************************
354
/*******************************************************************************
355
* Function Name  : UART1_IRQHandler
355
* Function Name  : UART1_IRQHandler
356
* Description    : This function handles the UART1 interrupt request
356
* Description    : This function handles the UART1 interrupt request
357
*******************************************************************************/
357
*******************************************************************************/
358
/*void UART1_IRQHandler(void)
358
/*void UART1_IRQHandler(void)
359
{      
359
{      
360
} */
360
} */
361
/*******************************************************************************
361
/*******************************************************************************
362
* Function Name  : UART2_IRQHandler
362
* Function Name  : UART2_IRQHandler
363
* Description    : This function handles the UART2 interrupt request
363
* Description    : This function handles the UART2 interrupt request
364
*******************************************************************************/
364
*******************************************************************************/
365
/*void UART2_IRQHandler(void)
365
/*void UART2_IRQHandler(void)
366
{
366
{
367
} */
367
} */
368
/*******************************************************************************
368
/*******************************************************************************
369
* Function Name  : I2C0_IRQHandler
369
* Function Name  : I2C0_IRQHandler
370
* Description    : This function handles the I2C0 interrupt request
370
* Description    : This function handles the I2C0 interrupt request
371
*******************************************************************************/
371
*******************************************************************************/
372
void I2C0_IRQHandler(void)
372
void I2C0_IRQHandler(void)
373
{
373
{
374
}
374
}
375
/*******************************************************************************
375
/*******************************************************************************
376
* Function Name  : I2C1_IRQHandler
376
* Function Name  : I2C1_IRQHandler
377
* Description    : This function handles the I2C1 interrupt request
377
* Description    : This function handles the I2C1 interrupt request
378
*******************************************************************************/
378
*******************************************************************************/
379
/*void I2C1_IRQHandler(void)
379
/*void I2C1_IRQHandler(void)
380
{
380
{
381
} */
381
} */
382
/*******************************************************************************
382
/*******************************************************************************
383
* Function Name  : SSP0_IRQHandler
383
* Function Name  : SSP0_IRQHandler
384
* Description    : This function handles the SSP0 interrupt request
384
* Description    : This function handles the SSP0 interrupt request
385
*******************************************************************************/
385
*******************************************************************************/
386
/*void SSP0_IRQHandler(void)
386
/*void SSP0_IRQHandler(void)
387
{
387
{
388
} */
388
} */
389
/*******************************************************************************
389
/*******************************************************************************
390
* Function Name  : SSP1_IRQHandler
390
* Function Name  : SSP1_IRQHandler
391
* Description    : This function handles the SSP1 interrupt request
391
* Description    : This function handles the SSP1 interrupt request
392
*******************************************************************************/
392
*******************************************************************************/
393
void SSP1_IRQHandler(void)
393
void SSP1_IRQHandler(void)
394
{
394
{
395
}
395
}
396
/*******************************************************************************
396
/*******************************************************************************
397
* Function Name  : LVD_IRQHandler
397
* Function Name  : LVD_IRQHandler
398
* Description    : This function handles the LVD interrupt request
398
* Description    : This function handles the LVD interrupt request
399
*******************************************************************************/
399
*******************************************************************************/
400
void LVD_IRQHandler(void)
400
void LVD_IRQHandler(void)
401
{
401
{
402
}
402
}
403
/*******************************************************************************
403
/*******************************************************************************
404
* Function Name  : RTC_IRQHandler
404
* Function Name  : RTC_IRQHandler
405
* Description    : This function handles the RTC interrupt request
405
* Description    : This function handles the RTC interrupt request
406
*******************************************************************************/
406
*******************************************************************************/
407
void RTC_IRQHandler(void)
407
void RTC_IRQHandler(void)
408
{
408
{
409
}
409
}
410
/*******************************************************************************
410
/*******************************************************************************
411
* Function Name  : WIU_IRQHandler
411
* Function Name  : WIU_IRQHandler
412
* Description    : This function handles the WIU interrupt request
412
* Description    : This function handles the WIU interrupt request
413
*******************************************************************************/
413
*******************************************************************************/
414
void WIU_IRQHandler(void)
414
void WIU_IRQHandler(void)
415
{
415
{
416
}
416
}
417
/*******************************************************************************
417
/*******************************************************************************
418
* Function Name  : EXTIT0_IRQHandler
418
* Function Name  : EXTIT0_IRQHandler
419
* Description    : This function handles the EXTIT0 interrupt request
419
* Description    : This function handles the EXTIT0 interrupt request
420
*******************************************************************************/
420
*******************************************************************************/
421
void EXTIT0_IRQHandler(void)
421
void EXTIT0_IRQHandler(void)
422
{
422
{
423
}
423
}
424
/*******************************************************************************
424
/*******************************************************************************
425
* Function Name  : EXTIT1_IRQHandler
425
* Function Name  : EXTIT1_IRQHandler
426
* Description    : This function handles the EXTIT1 interrupt request
426
* Description    : This function handles the EXTIT1 interrupt request
427
*******************************************************************************/
427
*******************************************************************************/
428
void EXTIT1_IRQHandler(void)
428
void EXTIT1_IRQHandler(void)
429
{
429
{
430
        VIC_ITCmd(EXTIT1_ITLine, DISABLE);
430
        VIC_ITCmd(EXTIT1_ITLine, DISABLE);
431
        if(WIU_GetITStatus(WIU_Line11) != RESET)
431
        if(WIU_GetITStatus(WIU_Line11) != RESET)
432
        {
432
        {
433
                BeepTime = 100;
433
                BeepTime = 100;
434
                Fat16_Init(); // initialize sd-card file system.
434
                Fat16_Init(); // initialize sd-card file system.
435
 
435
 
436
                WIU_ClearFlag(WIU_Line1);
436
                WIU_ClearFlag(WIU_Line1);
437
                WIU_ClearITPendingBit(WIU_Line11);
437
                WIU_ClearITPendingBit(WIU_Line11);
438
        }
438
        }
439
        VIC_ITCmd(EXTIT1_ITLine, ENABLE);
439
        VIC_ITCmd(EXTIT1_ITLine, ENABLE);
440
}
440
}
441
/*******************************************************************************
441
/*******************************************************************************
442
* Function Name  : EXTIT2_IRQHandler
442
* Function Name  : EXTIT2_IRQHandler
443
* Description    : This function handles the EXTIT2 interrupt request
443
* Description    : This function handles the EXTIT2 interrupt request
444
*******************************************************************************/
444
*******************************************************************************/
445
void EXTIT2_IRQHandler(void)
445
void EXTIT2_IRQHandler(void)
446
{
446
{
447
}
447
}
448
/*******************************************************************************
448
/*******************************************************************************
449
* Function Name  : EXTIT3_IRQHandler
449
* Function Name  : EXTIT3_IRQHandler
450
* Description    : This function handles the EXTIT3 interrupt request
450
* Description    : This function handles the EXTIT3 interrupt request
451
*******************************************************************************/
451
*******************************************************************************/
452
void EXTIT3_IRQHandler(void)
452
void EXTIT3_IRQHandler(void)
453
{
453
{
454
}
454
}
455
/*******************************************************************************
455
/*******************************************************************************
456
* Function Name  : USBWU_IRQHandler
456
* Function Name  : USBWU_IRQHandler
457
* Description    : This function handles the USBWU interrupt request
457
* Description    : This function handles the USBWU interrupt request
458
*******************************************************************************/
458
*******************************************************************************/
459
void USBWU_IRQHandler(void)
459
void USBWU_IRQHandler(void)
460
{
460
{
461
}
461
}
462
/*******************************************************************************
462
/*******************************************************************************
463
* Function Name  : PFQBC_IRQHandler
463
* Function Name  : PFQBC_IRQHandler
464
* Description    : This function handles the PFQBC interrupt request
464
* Description    : This function handles the PFQBC interrupt request
465
*******************************************************************************/
465
*******************************************************************************/
466
void PFQBC_IRQHandler(void)
466
void PFQBC_IRQHandler(void)
467
{
467
{
468
}
468
}
469
 
469
 
470
 
470