Rev 24 | Rev 81 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 24 | Rev 41 | ||
---|---|---|---|
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 |
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 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 this software (or part of it) to systems (other than 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" |
|
- | 58 | #include "usb_lib.h" |
|
- | 59 | #include "fat16.h" |
|
57 | #include "main.h" |
60 | #include "main.h" |
58 | - | ||
- | 61 | #include "uart1.h" |
|
59 | #define global extern /* to declare external variables and functions */ |
62 | #define global extern /* to declare external variables and functions */ |
60 | 63 | ||
61 | extern void USB_Istr(void); |
64 | extern void USB_Istr(void); |
62 | 65 | ||
63 | void SWI_Handler (void) __attribute__ ((interrupt ("SWI"))); |
66 | void SWI_Handler (void) __attribute__ ((interrupt ("SWI"))); |
64 | void Prefetch_Handler (void) __attribute__ ((interrupt ("ABORT"))); |
67 | void Prefetch_Handler (void) __attribute__ ((interrupt ("ABORT"))); |
65 | void Abort_Handler (void) __attribute__ ((interrupt ("ABORT"))); |
68 | void Abort_Handler (void) __attribute__ ((interrupt ("ABORT"))); |
66 | void Undefined_Handler (void) __attribute__ ((interrupt ("UNDEF"))); |
69 | void Undefined_Handler (void) __attribute__ ((interrupt ("UNDEF"))); |
67 | void FIQ_Handler (void) __attribute__ ((interrupt ("FIQ"))); |
70 | void FIQ_Handler (void) __attribute__ ((interrupt ("FIQ"))); |
68 | 71 | ||
69 | void Dummy_Handler(void) |
72 | void Dummy_Handler(void) |
70 | { |
73 | { |
71 | VIC0->VAR = 0xFF; |
74 | VIC0->VAR = 0xFF; |
72 | VIC1->VAR = 0XFF; |
75 | VIC1->VAR = 0xFF; |
73 | } |
76 | } |
- | 77 | ||
74 | 78 | /* avoid the surprising reset-like behaviour by spurious interrupts */ |
|
75 | void InitInterrupt(void) |
79 | void Interrupt_Init(void) |
76 | { |
80 | { |
77 | VIC0->DVAR = (u32)Dummy_Handler; |
81 | VIC0->DVAR = (u32)Dummy_Handler; |
78 | VIC1->DVAR = (u32)Dummy_Handler; |
82 | VIC1->DVAR = (u32)Dummy_Handler; |
79 | } |
83 | } |
- | 84 | /******************************************************************************* |
|
- | 85 | * Function Name : SWI_Handler |
|
- | 86 | * Description : This function handles SW exception. |
|
- | 87 | * Input : None |
|
- | 88 | * Output : None |
|
- | 89 | * Return : None |
|
80 | - | ||
- | 90 | *******************************************************************************/ |
|
81 | void SWI_Handler (void) |
91 | void SWI_Handler (void) |
82 | { |
92 | { |
83 | } |
93 | } |
- | 94 | ||
- | 95 | /******************************************************************************* |
|
- | 96 | * Function Name : Abort_Handler |
|
- | 97 | * Description : This function handles data abort exception. |
|
- | 98 | * Input : None |
|
- | 99 | * Output : None |
|
84 | - | ||
- | 100 | * Return : None |
|
85 | 101 | *******************************************************************************/ |
|
86 | void Abort_Handler (void) |
102 | void Abort_Handler (void) |
- | 103 | { |
|
- | 104 | SerialPutString("\r\nAbort Handler"); |
|
- | 105 | while(1) |
|
- | 106 | { |
|
- | 107 | // infinite loop |
|
87 | { |
108 | } |
- | 109 | } |
|
- | 110 | ||
- | 111 | /******************************************************************************* |
|
- | 112 | * Function Name : Undefined_Handler |
|
- | 113 | * Description : This function handles undefined instruction exception. |
|
- | 114 | * Input : None |
|
- | 115 | * Output : None |
|
88 | } |
116 | * Return : None |
89 | 117 | *******************************************************************************/ |
|
- | 118 | void Undefined_Handler (void) |
|
- | 119 | { |
|
- | 120 | SerialPutString("\r\nUndefined Handler"); |
|
- | 121 | while(1) |
|
90 | void Undefined_Handler (void) |
122 | { |
91 | { |
123 | // infinite loop |
- | 124 | } |
|
- | 125 | } |
|
- | 126 | /******************************************************************************* |
|
- | 127 | * Function Name : FIQ_Handler |
|
- | 128 | * Description : This function handles FIQ exception. |
|
- | 129 | * Input : None |
|
- | 130 | * Output : None |
|
92 | } |
131 | * Return : None |
93 | 132 | *******************************************************************************/ |
|
94 | void FIQ_Handler (void) |
133 | void FIQ_Handler (void) |
95 | { |
134 | { |
96 | } |
135 | } |
97 | /******************************************************************************* |
136 | /******************************************************************************* |
98 | * Function Name : Prefetch_Handler |
137 | * Function Name : Prefetch_Handler |
99 | * Description : This function handles preftetch abort exception. |
138 | * Description : This function handles preftetch abort exception. |
100 | *******************************************************************************/ |
139 | *******************************************************************************/ |
101 | void Prefetch_Handler(void) |
140 | void Prefetch_Handler(void) |
102 | { |
141 | { |
- | 142 | SerialPutString("\r\nPrefetch Handler"); |
|
- | 143 | while(1) |
|
- | 144 | { |
|
- | 145 | // infinite loop |
|
- | 146 | } |
|
103 | } |
147 | } |
104 | /******************************************************************************* |
148 | /******************************************************************************* |
105 | * Function Name : WDG_IRQHandler |
149 | * Function Name : WDG_IRQHandler |
106 | * Description : This function handles the WDG interrupt request |
150 | * Description : This function handles the WDG interrupt request |
107 | *******************************************************************************/ |
151 | *******************************************************************************/ |
108 | void WDG_IRQHandler(void) |
152 | void WDG_IRQHandler(void) |
109 | { |
153 | { |
- | 154 | /*write your handler here*/ |
|
- | 155 | /* ... */ |
|
- | 156 | ||
- | 157 | ||
- | 158 | /*write any value to VIC0 VAR*/ |
|
- | 159 | VIC0->VAR = 0xFF; |
|
110 | } |
160 | } |
111 | /******************************************************************************* |
161 | /******************************************************************************* |
112 | * Function Name : SW_IRQHandler |
162 | * Function Name : SW_IRQHandler |
113 | * Description : This function handles the SW interrupt request |
163 | * Description : This function handles the SW interrupt request |
114 | *******************************************************************************/ |
164 | *******************************************************************************/ |
115 | void SW_IRQHandler(void) |
165 | void SW_IRQHandler(void) |
116 | { |
166 | { |
- | 167 | /*write your handler here*/ |
|
- | 168 | /* ... */ |
|
- | 169 | ||
- | 170 | ||
- | 171 | /*write any value to VIC0 VAR*/ |
|
- | 172 | VIC0->VAR = 0xFF; |
|
117 | } |
173 | } |
118 | /******************************************************************************* |
174 | /******************************************************************************* |
119 | * Function Name : ARMRX_IRQHandler |
175 | * Function Name : ARMRX_IRQHandler |
120 | * Description : This function handles the ARMRX interrupt request |
176 | * Description : This function handles the ARMRX interrupt request |
121 | *******************************************************************************/ |
177 | *******************************************************************************/ |
122 | void ARMRX_IRQHandler(void) |
178 | void ARMRX_IRQHandler(void) |
123 | { |
179 | { |
- | 180 | /*write your handler here*/ |
|
- | 181 | /* ... */ |
|
- | 182 | ||
- | 183 | ||
- | 184 | /*write any value to VIC0 VAR*/ |
|
- | 185 | VIC0->VAR = 0xFF; |
|
124 | } |
186 | } |
125 | /******************************************************************************* |
187 | /******************************************************************************* |
126 | * Function Name : ARMTX_IRQHandler |
188 | * Function Name : ARMTX_IRQHandler |
127 | * Description : This function handles the ARMTX interrupt request |
189 | * Description : This function handles the ARMTX interrupt request |
128 | *******************************************************************************/ |
190 | *******************************************************************************/ |
129 | void ARMTX_IRQHandler(void) |
191 | void ARMTX_IRQHandler(void) |
130 | { |
192 | { |
- | 193 | /*write your handler here*/ |
|
- | 194 | /* ... */ |
|
- | 195 | ||
- | 196 | ||
- | 197 | /*write any value to VIC0 VAR*/ |
|
- | 198 | VIC0->VAR = 0xFF; |
|
131 | } |
199 | } |
132 | /******************************************************************************* |
200 | /******************************************************************************* |
133 | * Function Name : TIM0_IRQHandler |
201 | * Function Name : TIM0_IRQHandler |
134 | * Description : This function handles the TIM0 interrupt request |
202 | * Description : This function handles the TIM0 interrupt request |
135 | *******************************************************************************/ |
203 | *******************************************************************************/ |
136 | void TIM0_IRQHandler(void) |
204 | void TIM0_IRQHandler(void) |
137 | { |
205 | { |
- | 206 | /*write your handler here*/ |
|
- | 207 | /* ... */ |
|
- | 208 | ||
- | 209 | ||
- | 210 | /*write any value to VIC0 VAR*/ |
|
- | 211 | VIC0->VAR = 0xFF; |
|
138 | } |
212 | } |
139 | /******************************************************************************* |
213 | /******************************************************************************* |
140 | * Function Name : TIM1_IRQHandler |
214 | * Function Name : TIM1_IRQHandler |
141 | * Description : This function handles the TIM1 interrupt request |
215 | * Description : This function handles the TIM1 interrupt request |
142 | *******************************************************************************/ |
216 | *******************************************************************************/ |
- | 217 | /* |
|
143 | //void TIM1_IRQHandler(void) |
218 | void TIM1_IRQHandler(void) |
144 | //{ |
219 | { |
- | 220 | // write any value to VIC0 VAR // |
|
- | 221 | VIC0->VAR = 0xFF; |
|
- | 222 | } |
|
145 | //} |
223 | */ |
146 | /******************************************************************************* |
224 | /******************************************************************************* |
147 | * Function Name : TIM2_IRQHandler |
225 | * Function Name : TIM2_IRQHandler |
148 | * Description : This function handles the TIM2 interrupt request |
226 | * Description : This function handles the TIM2 interrupt request |
149 | *******************************************************************************/ |
227 | *******************************************************************************/ |
150 | void TIM2_IRQHandler(void) |
228 | void TIM2_IRQHandler(void) |
151 | { |
229 | { |
- | 230 | /*write your handler here*/ |
|
- | 231 | /* ... */ |
|
- | 232 | ||
- | 233 | ||
- | 234 | /*write any value to VIC0 VAR*/ |
|
- | 235 | VIC0->VAR = 0xFF; |
|
152 | } |
236 | } |
153 | /******************************************************************************* |
237 | /******************************************************************************* |
154 | * Function Name : TIM3_IRQHandler |
238 | * Function Name : TIM3_IRQHandler |
155 | * Description : This function handles the TIM3 interrupt request |
239 | * Description : This function handles the TIM3 interrupt request |
156 | *******************************************************************************/ |
240 | *******************************************************************************/ |
157 | void TIM3_IRQHandler(void) |
241 | void TIM3_IRQHandler(void) |
158 | { |
242 | { |
- | 243 | /*write your handler here*/ |
|
- | 244 | /* ... */ |
|
- | 245 | ||
- | 246 | ||
- | 247 | /*write any value to VIC0 VAR*/ |
|
- | 248 | VIC0->VAR = 0xFF; |
|
159 | } |
249 | } |
160 | /******************************************************************************* |
250 | /******************************************************************************* |
161 | * Function Name : USBHP_IRQHandler |
251 | * Function Name : USBHP_IRQHandler |
162 | * Description : This function handles the USBHP interrupt request |
252 | * Description : This function handles the USBHP interrupt request |
163 | *******************************************************************************/ |
253 | *******************************************************************************/ |
164 | void USBHP_IRQHandler(void) |
254 | void USBHP_IRQHandler(void) |
165 | { |
255 | { |
166 | CTR_HP(); |
256 | CTR_HP(); |
- | 257 | /*write any value to VIC0 VAR*/ |
|
- | 258 | VIC0->VAR = 0xFF; |
|
167 | } |
259 | } |
168 | /******************************************************************************* |
260 | /******************************************************************************* |
169 | * Function Name : USBLP_IRQHandler |
261 | * Function Name : USBLP_IRQHandler |
170 | * Description : This function handles the USBLP interrupt request |
262 | * Description : This function handles the USBLP interrupt request |
171 | *******************************************************************************/ |
263 | *******************************************************************************/ |
172 | void USBLP_IRQHandler(void) |
264 | void USBLP_IRQHandler(void) |
173 | { |
265 | { |
- | 266 | USB_Istr(); /*write any value to VIC0 VAR*/ |
|
174 | USB_Istr(); |
267 | VIC0->VAR = 0xFF; |
175 | } |
268 | } |
176 | /******************************************************************************* |
269 | /******************************************************************************* |
177 | * Function Name : SCU_IRQHandler |
270 | * Function Name : SCU_IRQHandler |
178 | * Description : This function handles the SCU interrupt request |
271 | * Description : This function handles the SCU interrupt request |
179 | *******************************************************************************/ |
272 | *******************************************************************************/ |
180 | void SCU_IRQHandler(void) |
273 | void SCU_IRQHandler(void) |
181 | { |
274 | { |
- | 275 | /*write your handler here*/ |
|
- | 276 | /* ... */ |
|
- | 277 | ||
- | 278 | ||
- | 279 | /*write any value to VIC0 VAR*/ |
|
- | 280 | VIC0->VAR = 0xFF; |
|
182 | } |
281 | } |
183 | /******************************************************************************* |
282 | /******************************************************************************* |
184 | * Function Name : ENET_IRQHandler |
283 | * Function Name : ENET_IRQHandler |
185 | * Description : This function handles the DENET interrupt request |
284 | * Description : This function handles the DENET interrupt request |
186 | *******************************************************************************/ |
285 | *******************************************************************************/ |
187 | void ENET_IRQHandler(void) |
286 | void ENET_IRQHandler(void) |
188 | { |
287 | { |
- | 288 | /*write your handler here*/ |
|
- | 289 | /* ... */ |
|
- | 290 | ||
- | 291 | ||
- | 292 | /*write any value to VIC0 VAR*/ |
|
- | 293 | VIC0->VAR = 0xFF; |
|
189 | } |
294 | } |
190 | /******************************************************************************* |
295 | /******************************************************************************* |
191 | * Function Name : DMA_IRQHandler |
296 | * Function Name : DMA_IRQHandler |
192 | * Description : This function handles the DMA interrupt request |
297 | * Description : This function handles the DMA interrupt request |
193 | *******************************************************************************/ |
298 | *******************************************************************************/ |
194 | void DMA_IRQHandler(void) |
299 | void DMA_IRQHandler(void) |
195 | { |
300 | { |
- | 301 | /*write your handler here*/ |
|
- | 302 | /* ... */ |
|
- | 303 | ||
- | 304 | ||
- | 305 | /*write any value to VIC0 VAR*/ |
|
- | 306 | VIC0->VAR = 0xFF; |
|
196 | } |
307 | } |
197 | /******************************************************************************* |
308 | /******************************************************************************* |
198 | * Function Name : CAN_IRQHandler |
309 | * Function Name : CAN_IRQHandler |
199 | * Description : This function handles the CAN interrupt request |
310 | * Description : This function handles the CAN interrupt request |
200 | *******************************************************************************/ |
311 | *******************************************************************************/ |
201 | void CAN_IRQHandler(void) |
312 | void CAN_IRQHandler(void) |
202 | { |
313 | { |
- | 314 | /*write your handler here*/ |
|
- | 315 | /* ... */ |
|
- | 316 | ||
- | 317 | ||
- | 318 | /*write any value to VIC0 VAR*/ |
|
- | 319 | VIC0->VAR = 0xFF; |
|
203 | } |
320 | } |
204 | /******************************************************************************* |
321 | /******************************************************************************* |
205 | * Function Name : MC_IRQHandler |
322 | * Function Name : MC_IRQHandler |
206 | * Description : This function handles the MC interrupt request |
323 | * Description : This function handles the MC interrupt request |
207 | *******************************************************************************/ |
324 | *******************************************************************************/ |
208 | void MC_IRQHandler(void) |
325 | void MC_IRQHandler(void) |
209 | { |
326 | { |
- | 327 | /*write your handler here*/ |
|
- | 328 | /* ... */ |
|
- | 329 | ||
- | 330 | ||
- | 331 | /*write any value to VIC0 VAR*/ |
|
- | 332 | VIC0->VAR = 0xFF; |
|
210 | } |
333 | } |
211 | /******************************************************************************* |
334 | /******************************************************************************* |
212 | * Function Name : ADC_IRQHandler |
335 | * Function Name : ADC_IRQHandler |
213 | * Description : This function handles the ADC interrupt request |
336 | * Description : This function handles the ADC interrupt request |
214 | *******************************************************************************/ |
337 | *******************************************************************************/ |
215 | void ADC_IRQHandler(void) |
338 | void ADC_IRQHandler(void) |
216 | { |
339 | { |
- | 340 | /*write your handler here*/ |
|
- | 341 | /* ... */ |
|
- | 342 | ||
- | 343 | ||
- | 344 | /*write any value to VIC0 VAR*/ |
|
- | 345 | VIC0->VAR = 0xFF; |
|
217 | } |
346 | } |
218 | /******************************************************************************* |
347 | /******************************************************************************* |
219 | * Function Name : UART0_IRQHandler |
348 | * Function Name : UART0_IRQHandler |
220 | * Description : This function handles the UART0 interrupt request |
349 | * Description : This function handles the UART0 interrupt request |
221 | *******************************************************************************/ |
350 | *******************************************************************************/ |
222 | /*void UART0_IRQHandler(void) |
351 | /*void UART0_IRQHandler(void) |
223 | { |
352 | { |
224 | } */ |
353 | } */ |
225 | /******************************************************************************* |
354 | /******************************************************************************* |
226 | * Function Name : UART1_IRQHandler |
355 | * Function Name : UART1_IRQHandler |
227 | * Description : This function handles the UART1 interrupt request |
356 | * Description : This function handles the UART1 interrupt request |
228 | *******************************************************************************/ |
357 | *******************************************************************************/ |
229 | //void UART1_IRQHandler(void) __attribute__ ((interrupt ("IRQ"))); |
- | |
230 | /*void UART1_IRQHandler(void) |
358 | /*void UART1_IRQHandler(void) |
231 | { |
359 | { |
232 | UART1->DR = UART1->DR; |
- | |
233 | - | ||
234 | UART_ClearITPendingBit(UART1, UART_IT_Receive); |
- | |
235 | |
- | |
236 | } |
- | |
237 | */ |
360 | } */ |
238 | /******************************************************************************* |
361 | /******************************************************************************* |
239 | * Function Name : UART2_IRQHandler |
362 | * Function Name : UART2_IRQHandler |
240 | * Description : This function handles the UART2 interrupt request |
363 | * Description : This function handles the UART2 interrupt request |
241 | *******************************************************************************/ |
364 | *******************************************************************************/ |
242 | void UART2_IRQHandler(void) |
365 | /*void UART2_IRQHandler(void) |
243 | { |
366 | { |
244 | } |
367 | } */ |
245 | /******************************************************************************* |
368 | /******************************************************************************* |
246 | * Function Name : I2C0_IRQHandler |
369 | * Function Name : I2C0_IRQHandler |
247 | * Description : This function handles the I2C0 interrupt request |
370 | * Description : This function handles the I2C0 interrupt request |
248 | *******************************************************************************/ |
371 | *******************************************************************************/ |
249 | void I2C0_IRQHandler(void) |
372 | void I2C0_IRQHandler(void) |
250 | { |
373 | { |
251 | } |
374 | } |
252 | /******************************************************************************* |
375 | /******************************************************************************* |
253 | * Function Name : I2C1_IRQHandler |
376 | * Function Name : I2C1_IRQHandler |
254 | * Description : This function handles the I2C1 interrupt request |
377 | * Description : This function handles the I2C1 interrupt request |
255 | *******************************************************************************/ |
378 | *******************************************************************************/ |
256 | /*void I2C1_IRQHandler(void) |
379 | /*void I2C1_IRQHandler(void) |
257 | { |
380 | { |
258 | } */ |
381 | } */ |
259 | /******************************************************************************* |
382 | /******************************************************************************* |
260 | * Function Name : SSP0_IRQHandler |
383 | * Function Name : SSP0_IRQHandler |
261 | * Description : This function handles the SSP0 interrupt request |
384 | * Description : This function handles the SSP0 interrupt request |
262 | *******************************************************************************/ |
385 | *******************************************************************************/ |
263 | /*void SSP0_IRQHandler(void) |
386 | /*void SSP0_IRQHandler(void) |
264 | { |
387 | { |
265 | } */ |
388 | } */ |
266 | /******************************************************************************* |
389 | /******************************************************************************* |
267 | * Function Name : SSP1_IRQHandler |
390 | * Function Name : SSP1_IRQHandler |
268 | * Description : This function handles the SSP1 interrupt request |
391 | * Description : This function handles the SSP1 interrupt request |
269 | *******************************************************************************/ |
392 | *******************************************************************************/ |
270 | void SSP1_IRQHandler(void) |
393 | void SSP1_IRQHandler(void) |
271 | { |
394 | { |
272 | } |
395 | } |
273 | /******************************************************************************* |
396 | /******************************************************************************* |
274 | * Function Name : LVD_IRQHandler |
397 | * Function Name : LVD_IRQHandler |
275 | * Description : This function handles the LVD interrupt request |
398 | * Description : This function handles the LVD interrupt request |
276 | *******************************************************************************/ |
399 | *******************************************************************************/ |
277 | void LVD_IRQHandler(void) |
400 | void LVD_IRQHandler(void) |
278 | { |
401 | { |
279 | } |
402 | } |
280 | /******************************************************************************* |
403 | /******************************************************************************* |
281 | * Function Name : RTC_IRQHandler |
404 | * Function Name : RTC_IRQHandler |
282 | * Description : This function handles the RTC interrupt request |
405 | * Description : This function handles the RTC interrupt request |
283 | *******************************************************************************/ |
406 | *******************************************************************************/ |
284 | void RTC_IRQHandler(void) |
407 | void RTC_IRQHandler(void) |
285 | { |
408 | { |
286 | } |
409 | } |
287 | /******************************************************************************* |
410 | /******************************************************************************* |
288 | * Function Name : WIU_IRQHandler |
411 | * Function Name : WIU_IRQHandler |
289 | * Description : This function handles the WIU interrupt request |
412 | * Description : This function handles the WIU interrupt request |
290 | *******************************************************************************/ |
413 | *******************************************************************************/ |
291 | void WIU_IRQHandler(void) |
414 | void WIU_IRQHandler(void) |
292 | { |
415 | { |
293 | } |
416 | } |
294 | /******************************************************************************* |
417 | /******************************************************************************* |
295 | * Function Name : EXTIT0_IRQHandler |
418 | * Function Name : EXTIT0_IRQHandler |
296 | * Description : This function handles the EXTIT0 interrupt request |
419 | * Description : This function handles the EXTIT0 interrupt request |
297 | *******************************************************************************/ |
420 | *******************************************************************************/ |
298 | void EXTIT0_IRQHandler(void) |
421 | void EXTIT0_IRQHandler(void) |
299 | { |
422 | { |
300 | } |
423 | } |
301 | /******************************************************************************* |
424 | /******************************************************************************* |
302 | * Function Name : EXTIT1_IRQHandler |
425 | * Function Name : EXTIT1_IRQHandler |
303 | * Description : This function handles the EXTIT1 interrupt request |
426 | * Description : This function handles the EXTIT1 interrupt request |
304 | *******************************************************************************/ |
427 | *******************************************************************************/ |
305 | void EXTIT1_IRQHandler(void) |
428 | void EXTIT1_IRQHandler(void) |
306 | { |
429 | { |
307 | VIC_ITCmd(EXTIT1_ITLine, DISABLE); |
430 | VIC_ITCmd(EXTIT1_ITLine, DISABLE); |
308 | if(WIU_GetITStatus(WIU_Line11) != RESET) |
431 | if(WIU_GetITStatus(WIU_Line11) != RESET) |
309 | { |
432 | { |
310 | BeepTime = 100; |
433 | BeepTime = 100; |
311 | InitFat16(); // initialize sd-card file system. |
434 | Fat16_Init(); // initialize sd-card file system. |
312 | 435 | ||
313 | WIU_ClearFlag(WIU_Line1); |
436 | WIU_ClearFlag(WIU_Line1); |
314 | WIU_ClearITPendingBit(WIU_Line11); |
437 | WIU_ClearITPendingBit(WIU_Line11); |
315 | } |
438 | } |
316 | VIC_ITCmd(EXTIT1_ITLine, ENABLE); |
439 | VIC_ITCmd(EXTIT1_ITLine, ENABLE); |
317 | } |
440 | } |
318 | /******************************************************************************* |
441 | /******************************************************************************* |
319 | * Function Name : EXTIT2_IRQHandler |
442 | * Function Name : EXTIT2_IRQHandler |
320 | * Description : This function handles the EXTIT2 interrupt request |
443 | * Description : This function handles the EXTIT2 interrupt request |
321 | *******************************************************************************/ |
444 | *******************************************************************************/ |
322 | void EXTIT2_IRQHandler(void) |
445 | void EXTIT2_IRQHandler(void) |
323 | { |
446 | { |
324 | } |
447 | } |
325 | /******************************************************************************* |
448 | /******************************************************************************* |
326 | * Function Name : EXTIT3_IRQHandler |
449 | * Function Name : EXTIT3_IRQHandler |
327 | * Description : This function handles the EXTIT3 interrupt request |
450 | * Description : This function handles the EXTIT3 interrupt request |
328 | *******************************************************************************/ |
451 | *******************************************************************************/ |
329 | void EXTIT3_IRQHandler(void) |
452 | void EXTIT3_IRQHandler(void) |
330 | { |
453 | { |
331 | } |
454 | } |
332 | /******************************************************************************* |
455 | /******************************************************************************* |
333 | * Function Name : USBWU_IRQHandler |
456 | * Function Name : USBWU_IRQHandler |
334 | * Description : This function handles the USBWU interrupt request |
457 | * Description : This function handles the USBWU interrupt request |
335 | *******************************************************************************/ |
458 | *******************************************************************************/ |
336 | void USBWU_IRQHandler(void) |
459 | void USBWU_IRQHandler(void) |
337 | { |
460 | { |
338 | } |
461 | } |
339 | /******************************************************************************* |
462 | /******************************************************************************* |
340 | * Function Name : PFQBC_IRQHandler |
463 | * Function Name : PFQBC_IRQHandler |
341 | * Description : This function handles the PFQBC interrupt request |
464 | * Description : This function handles the PFQBC interrupt request |
342 | *******************************************************************************/ |
465 | *******************************************************************************/ |
343 | void PFQBC_IRQHandler(void) |
466 | void PFQBC_IRQHandler(void) |
344 | { |
467 | { |
345 | } |
468 | } |
346 | 469 | ||
347 | 470 |