gpio_default_8258.h
Go to the documentation of this file.
1 /********************************************************************************************************
2  * @file gpio_default_8258.h
3  *
4  * @brief This is the header file for TLSR8258
5  *
6  * @author Driver Group
7  * @date May 8, 2018
8  *
9  * @par Copyright (c) 2018, Telink Semiconductor (Shanghai) Co., Ltd.
10  * All rights reserved.
11  *
12  * The information contained herein is confidential property of Telink
13  * Semiconductor (Shanghai) Co., Ltd. and is available under the terms
14  * of Commercial License Agreement between Telink Semiconductor (Shanghai)
15  * Co., Ltd. and the licensee or the terms described here-in. This heading
16  * MUST NOT be removed from this file.
17  *
18  * Licensees are granted free, non-transferable use of the information in this
19  * file under Mutual Non-Disclosure Agreement. NO WARRENTY of ANY KIND is provided.
20  *
21  *******************************************************************************************************/
22 
23 #pragma once
24 
25 #ifndef PA0_INPUT_ENABLE
26 #define PA0_INPUT_ENABLE 0
27 #endif
28 #ifndef PA1_INPUT_ENABLE
29 #define PA1_INPUT_ENABLE 0
30 #endif
31 #ifndef PA2_INPUT_ENABLE
32 #define PA2_INPUT_ENABLE 0
33 #endif
34 #ifndef PA3_INPUT_ENABLE
35 #define PA3_INPUT_ENABLE 0
36 #endif
37 #ifndef PA4_INPUT_ENABLE
38 #define PA4_INPUT_ENABLE 0
39 #endif
40 #ifndef PA5_INPUT_ENABLE
41 #define PA5_INPUT_ENABLE 0 //USB
42 #endif
43 #ifndef PA6_INPUT_ENABLE
44 #define PA6_INPUT_ENABLE 0 //USB
45 #endif
46 #ifndef PA7_INPUT_ENABLE
47 #define PA7_INPUT_ENABLE 1 //SWS
48 #endif
49 #ifndef PA0_OUTPUT_ENABLE
50 #define PA0_OUTPUT_ENABLE 0
51 #endif
52 #ifndef PA1_OUTPUT_ENABLE
53 #define PA1_OUTPUT_ENABLE 0
54 #endif
55 #ifndef PA2_OUTPUT_ENABLE
56 #define PA2_OUTPUT_ENABLE 0
57 #endif
58 #ifndef PA3_OUTPUT_ENABLE
59 #define PA3_OUTPUT_ENABLE 0
60 #endif
61 #ifndef PA4_OUTPUT_ENABLE
62 #define PA4_OUTPUT_ENABLE 0
63 #endif
64 #ifndef PA5_OUTPUT_ENABLE
65 #define PA5_OUTPUT_ENABLE 0
66 #endif
67 #ifndef PA6_OUTPUT_ENABLE
68 #define PA6_OUTPUT_ENABLE 0
69 #endif
70 #ifndef PA7_OUTPUT_ENABLE
71 #define PA7_OUTPUT_ENABLE 0
72 #endif
73 #ifndef PA0_DATA_STRENGTH
74 #define PA0_DATA_STRENGTH 1
75 #endif
76 #ifndef PA1_DATA_STRENGTH
77 #define PA1_DATA_STRENGTH 1
78 #endif
79 #ifndef PA2_DATA_STRENGTH
80 #define PA2_DATA_STRENGTH 1
81 #endif
82 #ifndef PA3_DATA_STRENGTH
83 #define PA3_DATA_STRENGTH 1
84 #endif
85 #ifndef PA4_DATA_STRENGTH
86 #define PA4_DATA_STRENGTH 1
87 #endif
88 #ifndef PA5_DATA_STRENGTH
89 #define PA5_DATA_STRENGTH 1
90 #endif
91 #ifndef PA6_DATA_STRENGTH
92 #define PA6_DATA_STRENGTH 1
93 #endif
94 #ifndef PA7_DATA_STRENGTH
95 #define PA7_DATA_STRENGTH 1
96 #endif
97 #ifndef PA0_DATA_OUT
98 #define PA0_DATA_OUT 0
99 #endif
100 #ifndef PA1_DATA_OUT
101 #define PA1_DATA_OUT 0
102 #endif
103 #ifndef PA2_DATA_OUT
104 #define PA2_DATA_OUT 0
105 #endif
106 #ifndef PA3_DATA_OUT
107 #define PA3_DATA_OUT 0
108 #endif
109 #ifndef PA4_DATA_OUT
110 #define PA4_DATA_OUT 0
111 #endif
112 #ifndef PA5_DATA_OUT
113 #define PA5_DATA_OUT 0
114 #endif
115 #ifndef PA6_DATA_OUT
116 #define PA6_DATA_OUT 0
117 #endif
118 #ifndef PA7_DATA_OUT
119 #define PA7_DATA_OUT 0
120 #endif
121 #ifndef PA0_FUNC
122 #define PA0_FUNC AS_GPIO
123 #endif
124 #ifndef PA1_FUNC
125 #define PA1_FUNC AS_GPIO
126 #endif
127 #ifndef PA2_FUNC
128 #define PA2_FUNC AS_GPIO
129 #endif
130 #ifndef PA3_FUNC
131 #define PA3_FUNC AS_GPIO
132 #endif
133 #ifndef PA4_FUNC
134 #define PA4_FUNC AS_GPIO
135 #endif
136 #ifndef PA5_FUNC
137 #define PA5_FUNC AS_GPIO
138 #endif
139 #ifndef PA6_FUNC
140 #define PA6_FUNC AS_GPIO
141 #endif
142 #ifndef PA7_FUNC
143 #define PA7_FUNC AS_SWIRE
144 #endif
145 #ifndef PULL_WAKEUP_SRC_PA0
146 #define PULL_WAKEUP_SRC_PA0 0
147 #endif
148 #ifndef PULL_WAKEUP_SRC_PA1
149 #define PULL_WAKEUP_SRC_PA1 0
150 #endif
151 #ifndef PULL_WAKEUP_SRC_PA2
152 #define PULL_WAKEUP_SRC_PA2 0
153 #endif
154 #ifndef PULL_WAKEUP_SRC_PA3
155 #define PULL_WAKEUP_SRC_PA3 0
156 #endif
157 #ifndef PULL_WAKEUP_SRC_PA4
158 #define PULL_WAKEUP_SRC_PA4 0
159 #endif
160 #ifndef PULL_WAKEUP_SRC_PA5
161 #define PULL_WAKEUP_SRC_PA5 0
162 #endif
163 #ifndef PULL_WAKEUP_SRC_PA6
164 #define PULL_WAKEUP_SRC_PA6 0
165 #endif
166 #ifndef PULL_WAKEUP_SRC_PA7
167 #define PULL_WAKEUP_SRC_PA7 PM_PIN_PULLUP_1M //sws pullup
168 #endif
169 
171 #ifndef PB0_INPUT_ENABLE
172 #define PB0_INPUT_ENABLE 0
173 #endif
174 #ifndef PB1_INPUT_ENABLE
175 #define PB1_INPUT_ENABLE 0
176 #endif
177 #ifndef PB2_INPUT_ENABLE
178 #define PB2_INPUT_ENABLE 0
179 #endif
180 #ifndef PB3_INPUT_ENABLE
181 #define PB3_INPUT_ENABLE 0
182 #endif
183 #ifndef PB4_INPUT_ENABLE
184 #define PB4_INPUT_ENABLE 0
185 #endif
186 #ifndef PB5_INPUT_ENABLE
187 #define PB5_INPUT_ENABLE 0
188 #endif
189 #ifndef PB6_INPUT_ENABLE
190 #define PB6_INPUT_ENABLE 0
191 #endif
192 #ifndef PB7_INPUT_ENABLE
193 #define PB7_INPUT_ENABLE 0
194 #endif
195 #ifndef PB0_OUTPUT_ENABLE
196 #define PB0_OUTPUT_ENABLE 0
197 #endif
198 #ifndef PB1_OUTPUT_ENABLE
199 #define PB1_OUTPUT_ENABLE 0
200 #endif
201 #ifndef PB2_OUTPUT_ENABLE
202 #define PB2_OUTPUT_ENABLE 0
203 #endif
204 #ifndef PB3_OUTPUT_ENABLE
205 #define PB3_OUTPUT_ENABLE 0
206 #endif
207 #ifndef PB4_OUTPUT_ENABLE
208 #define PB4_OUTPUT_ENABLE 0
209 #endif
210 #ifndef PB5_OUTPUT_ENABLE
211 #define PB5_OUTPUT_ENABLE 0
212 #endif
213 #ifndef PB6_OUTPUT_ENABLE
214 #define PB6_OUTPUT_ENABLE 0
215 #endif
216 #ifndef PB7_OUTPUT_ENABLE
217 #define PB7_OUTPUT_ENABLE 0
218 #endif
219 #ifndef PB0_DATA_STRENGTH
220 #define PB0_DATA_STRENGTH 1
221 #endif
222 #ifndef PB1_DATA_STRENGTH
223 #define PB1_DATA_STRENGTH 1
224 #endif
225 #ifndef PB2_DATA_STRENGTH
226 #define PB2_DATA_STRENGTH 1
227 #endif
228 #ifndef PB3_DATA_STRENGTH
229 #define PB3_DATA_STRENGTH 1
230 #endif
231 #ifndef PB4_DATA_STRENGTH
232 #define PB4_DATA_STRENGTH 1
233 #endif
234 #ifndef PB5_DATA_STRENGTH
235 #define PB5_DATA_STRENGTH 1
236 #endif
237 #ifndef PB6_DATA_STRENGTH
238 #define PB6_DATA_STRENGTH 1
239 #endif
240 #ifndef PB7_DATA_STRENGTH
241 #define PB7_DATA_STRENGTH 1
242 #endif
243 #ifndef PB0_DATA_OUT
244 #define PB0_DATA_OUT 0
245 #endif
246 #ifndef PB1_DATA_OUT
247 #define PB1_DATA_OUT 0
248 #endif
249 #ifndef PB2_DATA_OUT
250 #define PB2_DATA_OUT 0
251 #endif
252 #ifndef PB3_DATA_OUT
253 #define PB3_DATA_OUT 0
254 #endif
255 #ifndef PB4_DATA_OUT
256 #define PB4_DATA_OUT 0
257 #endif
258 #ifndef PB5_DATA_OUT
259 #define PB5_DATA_OUT 0
260 #endif
261 #ifndef PB6_DATA_OUT
262 #define PB6_DATA_OUT 0
263 #endif
264 #ifndef PB7_DATA_OUT
265 #define PB7_DATA_OUT 0
266 #endif
267 #ifndef PB0_FUNC
268 #define PB0_FUNC AS_GPIO
269 #endif
270 #ifndef PB1_FUNC
271 #define PB1_FUNC AS_GPIO
272 #endif
273 #ifndef PB2_FUNC
274 #define PB2_FUNC AS_GPIO
275 #endif
276 #ifndef PB3_FUNC
277 #define PB3_FUNC AS_GPIO
278 #endif
279 #ifndef PB4_FUNC
280 #define PB4_FUNC AS_GPIO
281 #endif
282 #ifndef PB5_FUNC
283 #define PB5_FUNC AS_GPIO
284 #endif
285 #ifndef PB6_FUNC
286 #define PB6_FUNC AS_GPIO
287 #endif
288 #ifndef PB7_FUNC
289 #define PB7_FUNC AS_GPIO
290 #endif
291 #ifndef PULL_WAKEUP_SRC_PB0
292 #define PULL_WAKEUP_SRC_PB0 0
293 #endif
294 #ifndef PULL_WAKEUP_SRC_PB1
295 #define PULL_WAKEUP_SRC_PB1 0
296 #endif
297 #ifndef PULL_WAKEUP_SRC_PB2
298 #define PULL_WAKEUP_SRC_PB2 0
299 #endif
300 #ifndef PULL_WAKEUP_SRC_PB3
301 #define PULL_WAKEUP_SRC_PB3 0
302 #endif
303 #ifndef PULL_WAKEUP_SRC_PB4
304 #define PULL_WAKEUP_SRC_PB4 0
305 #endif
306 #ifndef PULL_WAKEUP_SRC_PB5
307 #define PULL_WAKEUP_SRC_PB5 0
308 #endif
309 #ifndef PULL_WAKEUP_SRC_PB6
310 #define PULL_WAKEUP_SRC_PB6 0
311 #endif
312 #ifndef PULL_WAKEUP_SRC_PB7
313 #define PULL_WAKEUP_SRC_PB7 0
314 #endif
315 
317 #ifndef PC0_INPUT_ENABLE
318 #define PC0_INPUT_ENABLE 0
319 #endif
320 #ifndef PC1_INPUT_ENABLE
321 #define PC1_INPUT_ENABLE 0
322 #endif
323 #ifndef PC2_INPUT_ENABLE
324 #define PC2_INPUT_ENABLE 0
325 #endif
326 #ifndef PC3_INPUT_ENABLE
327 #define PC3_INPUT_ENABLE 0
328 #endif
329 #ifndef PC4_INPUT_ENABLE
330 #define PC4_INPUT_ENABLE 0
331 #endif
332 #ifndef PC5_INPUT_ENABLE
333 #define PC5_INPUT_ENABLE 0
334 #endif
335 #ifndef PC6_INPUT_ENABLE
336 #define PC6_INPUT_ENABLE 0
337 #endif
338 #ifndef PC7_INPUT_ENABLE
339 #define PC7_INPUT_ENABLE 0
340 #endif
341 #ifndef PC0_OUTPUT_ENABLE
342 #define PC0_OUTPUT_ENABLE 0
343 #endif
344 #ifndef PC1_OUTPUT_ENABLE
345 #define PC1_OUTPUT_ENABLE 0
346 #endif
347 #ifndef PC2_OUTPUT_ENABLE
348 #define PC2_OUTPUT_ENABLE 0
349 #endif
350 #ifndef PC3_OUTPUT_ENABLE
351 #define PC3_OUTPUT_ENABLE 0
352 #endif
353 #ifndef PC4_OUTPUT_ENABLE
354 #define PC4_OUTPUT_ENABLE 0
355 #endif
356 #ifndef PC5_OUTPUT_ENABLE
357 #define PC5_OUTPUT_ENABLE 0
358 #endif
359 #ifndef PC6_OUTPUT_ENABLE
360 #define PC6_OUTPUT_ENABLE 0
361 #endif
362 #ifndef PC7_OUTPUT_ENABLE
363 #define PC7_OUTPUT_ENABLE 0
364 #endif
365 #ifndef PC0_DATA_STRENGTH
366 #define PC0_DATA_STRENGTH 1
367 #endif
368 #ifndef PC1_DATA_STRENGTH
369 #define PC1_DATA_STRENGTH 1
370 #endif
371 #ifndef PC2_DATA_STRENGTH
372 #define PC2_DATA_STRENGTH 1
373 #endif
374 #ifndef PC3_DATA_STRENGTH
375 #define PC3_DATA_STRENGTH 1
376 #endif
377 #ifndef PC4_DATA_STRENGTH
378 #define PC4_DATA_STRENGTH 1
379 #endif
380 #ifndef PC5_DATA_STRENGTH
381 #define PC5_DATA_STRENGTH 1
382 #endif
383 #ifndef PC6_DATA_STRENGTH
384 #define PC6_DATA_STRENGTH 1
385 #endif
386 #ifndef PC7_DATA_STRENGTH
387 #define PC7_DATA_STRENGTH 1
388 #endif
389 #ifndef PC0_DATA_OUT
390 #define PC0_DATA_OUT 0
391 #endif
392 #ifndef PC1_DATA_OUT
393 #define PC1_DATA_OUT 0
394 #endif
395 #ifndef PC2_DATA_OUT
396 #define PC2_DATA_OUT 0
397 #endif
398 #ifndef PC3_DATA_OUT
399 #define PC3_DATA_OUT 0
400 #endif
401 #ifndef PC4_DATA_OUT
402 #define PC4_DATA_OUT 0
403 #endif
404 #ifndef PC5_DATA_OUT
405 #define PC5_DATA_OUT 0
406 #endif
407 #ifndef PC6_DATA_OUT
408 #define PC6_DATA_OUT 0
409 #endif
410 #ifndef PC7_DATA_OUT
411 #define PC7_DATA_OUT 0
412 #endif
413 #ifndef PC0_FUNC
414 #define PC0_FUNC AS_GPIO
415 #endif
416 #ifndef PC1_FUNC
417 #define PC1_FUNC AS_GPIO
418 #endif
419 #ifndef PC2_FUNC
420 #define PC2_FUNC AS_GPIO
421 #endif
422 #ifndef PC3_FUNC
423 #define PC3_FUNC AS_GPIO
424 #endif
425 #ifndef PC4_FUNC
426 #define PC4_FUNC AS_GPIO
427 #endif
428 #ifndef PC5_FUNC
429 #define PC5_FUNC AS_GPIO
430 #endif
431 #ifndef PC6_FUNC
432 #define PC6_FUNC AS_GPIO
433 #endif
434 #ifndef PC7_FUNC
435 #define PC7_FUNC AS_GPIO
436 #endif
437 #ifndef PULL_WAKEUP_SRC_PC0
438 #define PULL_WAKEUP_SRC_PC0 0
439 #endif
440 #ifndef PULL_WAKEUP_SRC_PC1
441 #define PULL_WAKEUP_SRC_PC1 0
442 #endif
443 #ifndef PULL_WAKEUP_SRC_PC2
444 #define PULL_WAKEUP_SRC_PC2 0
445 #endif
446 #ifndef PULL_WAKEUP_SRC_PC3
447 #define PULL_WAKEUP_SRC_PC3 0
448 #endif
449 #ifndef PULL_WAKEUP_SRC_PC4
450 #define PULL_WAKEUP_SRC_PC4 0
451 #endif
452 #ifndef PULL_WAKEUP_SRC_PC5
453 #define PULL_WAKEUP_SRC_PC5 0
454 #endif
455 #ifndef PULL_WAKEUP_SRC_PC6
456 #define PULL_WAKEUP_SRC_PC6 0
457 #endif
458 #ifndef PULL_WAKEUP_SRC_PC7
459 #define PULL_WAKEUP_SRC_PC7 0
460 #endif
461 
463 #ifndef PD0_INPUT_ENABLE
464 #define PD0_INPUT_ENABLE 0
465 #endif
466 #ifndef PD1_INPUT_ENABLE
467 #define PD1_INPUT_ENABLE 0
468 #endif
469 #ifndef PD2_INPUT_ENABLE
470 #define PD2_INPUT_ENABLE 0
471 #endif
472 #ifndef PD3_INPUT_ENABLE
473 #define PD3_INPUT_ENABLE 0
474 #endif
475 #ifndef PD4_INPUT_ENABLE
476 #define PD4_INPUT_ENABLE 0
477 #endif
478 #ifndef PD5_INPUT_ENABLE
479 #define PD5_INPUT_ENABLE 0
480 #endif
481 #ifndef PD6_INPUT_ENABLE
482 #define PD6_INPUT_ENABLE 0
483 #endif
484 #ifndef PD7_INPUT_ENABLE
485 #define PD7_INPUT_ENABLE 0
486 #endif
487 #ifndef PD0_OUTPUT_ENABLE
488 #define PD0_OUTPUT_ENABLE 0
489 #endif
490 #ifndef PD1_OUTPUT_ENABLE
491 #define PD1_OUTPUT_ENABLE 0
492 #endif
493 #ifndef PD2_OUTPUT_ENABLE
494 #define PD2_OUTPUT_ENABLE 0
495 #endif
496 #ifndef PD3_OUTPUT_ENABLE
497 #define PD3_OUTPUT_ENABLE 0
498 #endif
499 #ifndef PD4_OUTPUT_ENABLE
500 #define PD4_OUTPUT_ENABLE 0
501 #endif
502 #ifndef PD5_OUTPUT_ENABLE
503 #define PD5_OUTPUT_ENABLE 0
504 #endif
505 #ifndef PD6_OUTPUT_ENABLE
506 #define PD6_OUTPUT_ENABLE 0
507 #endif
508 #ifndef PD7_OUTPUT_ENABLE
509 #define PD7_OUTPUT_ENABLE 0
510 #endif
511 #ifndef PD0_DATA_STRENGTH
512 #define PD0_DATA_STRENGTH 1
513 #endif
514 #ifndef PD1_DATA_STRENGTH
515 #define PD1_DATA_STRENGTH 1
516 #endif
517 #ifndef PD2_DATA_STRENGTH
518 #define PD2_DATA_STRENGTH 1
519 #endif
520 #ifndef PD3_DATA_STRENGTH
521 #define PD3_DATA_STRENGTH 1
522 #endif
523 #ifndef PD4_DATA_STRENGTH
524 #define PD4_DATA_STRENGTH 1
525 #endif
526 #ifndef PD5_DATA_STRENGTH
527 #define PD5_DATA_STRENGTH 1
528 #endif
529 #ifndef PD6_DATA_STRENGTH
530 #define PD6_DATA_STRENGTH 1
531 #endif
532 #ifndef PD7_DATA_STRENGTH
533 #define PD7_DATA_STRENGTH 1
534 #endif
535 #ifndef PD0_DATA_OUT
536 #define PD0_DATA_OUT 0
537 #endif
538 #ifndef PD1_DATA_OUT
539 #define PD1_DATA_OUT 0
540 #endif
541 #ifndef PD2_DATA_OUT
542 #define PD2_DATA_OUT 0
543 #endif
544 #ifndef PD3_DATA_OUT
545 #define PD3_DATA_OUT 0
546 #endif
547 #ifndef PD4_DATA_OUT
548 #define PD4_DATA_OUT 0
549 #endif
550 #ifndef PD5_DATA_OUT
551 #define PD5_DATA_OUT 0
552 #endif
553 #ifndef PD6_DATA_OUT
554 #define PD6_DATA_OUT 0
555 #endif
556 #ifndef PD7_DATA_OUT
557 #define PD7_DATA_OUT 0
558 #endif
559 #ifndef PD0_FUNC
560 #define PD0_FUNC AS_GPIO
561 #endif
562 #ifndef PD1_FUNC
563 #define PD1_FUNC AS_GPIO
564 #endif
565 #ifndef PD2_FUNC
566 #define PD2_FUNC AS_GPIO
567 #endif
568 #ifndef PD3_FUNC
569 #define PD3_FUNC AS_GPIO
570 #endif
571 #ifndef PD4_FUNC
572 #define PD4_FUNC AS_GPIO
573 #endif
574 #ifndef PD5_FUNC
575 #define PD5_FUNC AS_GPIO
576 #endif
577 #ifndef PD6_FUNC
578 #define PD6_FUNC AS_GPIO
579 #endif
580 #ifndef PD7_FUNC
581 #define PD7_FUNC AS_GPIO
582 #endif
583 #ifndef PULL_WAKEUP_SRC_PD0
584 #define PULL_WAKEUP_SRC_PD0 0
585 #endif
586 #ifndef PULL_WAKEUP_SRC_PD1
587 #define PULL_WAKEUP_SRC_PD1 0
588 #endif
589 #ifndef PULL_WAKEUP_SRC_PD2
590 #define PULL_WAKEUP_SRC_PD2 0
591 #endif
592 #ifndef PULL_WAKEUP_SRC_PD3
593 #define PULL_WAKEUP_SRC_PD3 0
594 #endif
595 #ifndef PULL_WAKEUP_SRC_PD4
596 #define PULL_WAKEUP_SRC_PD4 0
597 #endif
598 #ifndef PULL_WAKEUP_SRC_PD5
599 #define PULL_WAKEUP_SRC_PD5 0
600 #endif
601 #ifndef PULL_WAKEUP_SRC_PD6
602 #define PULL_WAKEUP_SRC_PD6 0
603 #endif
604 #ifndef PULL_WAKEUP_SRC_PD7
605 #define PULL_WAKEUP_SRC_PD7 0
606 #endif
607 
609 #ifndef PE0_INPUT_ENABLE
610 #define PE0_INPUT_ENABLE 1 //MSPI
611 #endif
612 #ifndef PE1_INPUT_ENABLE
613 #define PE1_INPUT_ENABLE 1 //MSPI
614 #endif
615 #ifndef PE2_INPUT_ENABLE
616 #define PE2_INPUT_ENABLE 1 //MSPI
617 #endif
618 #ifndef PE3_INPUT_ENABLE
619 #define PE3_INPUT_ENABLE 1 //MSPI
620 #endif
621 #ifndef PE0_OUTPUT_ENABLE
622 #define PE0_OUTPUT_ENABLE 0
623 #endif
624 #ifndef PE1_OUTPUT_ENABLE
625 #define PE1_OUTPUT_ENABLE 0
626 #endif
627 #ifndef PE2_OUTPUT_ENABLE
628 #define PE2_OUTPUT_ENABLE 0
629 #endif
630 #ifndef PE3_OUTPUT_ENABLE
631 #define PE3_OUTPUT_ENABLE 0
632 #endif
633 
634 #ifndef PE0_DATA_STRENGTH
635 #define PE0_DATA_STRENGTH 1
636 #endif
637 #ifndef PE1_DATA_STRENGTH
638 #define PE1_DATA_STRENGTH 1
639 #endif
640 #ifndef PE2_DATA_STRENGTH
641 #define PE2_DATA_STRENGTH 1
642 #endif
643 #ifndef PE3_DATA_STRENGTH
644 #define PE3_DATA_STRENGTH 1
645 #endif
646 
647 #ifndef PE0_DATA_OUT
648 #define PE0_DATA_OUT 0
649 #endif
650 #ifndef PE1_DATA_OUT
651 #define PE1_DATA_OUT 0
652 #endif
653 #ifndef PE2_DATA_OUT
654 #define PE2_DATA_OUT 0
655 #endif
656 #ifndef PE3_DATA_OUT
657 #define PE3_DATA_OUT 0
658 #endif
659 
660 #ifndef PE0_FUNC
661 #define PE0_FUNC AS_MSPI
662 #endif
663 #ifndef PE1_FUNC
664 #define PE1_FUNC AS_MSPI
665 #endif
666 #ifndef PE2_FUNC
667 #define PE2_FUNC AS_MSPI
668 #endif
669 #ifndef PE3_FUNC
670 #define PE3_FUNC AS_MSPI
671 #endif
672 
673 
678 #define GPIO_PA0_PULL_FLOAT do{ unsigned char val = analog_read(areg_0e_pa0_pa3_pull); val &= ~0x03; analog_write(areg_0e_pa0_pa3_pull, val); }while(0)
679 #define GPIO_PA0_PULL_UP_1M do{ unsigned char val = analog_read(areg_0e_pa0_pa3_pull); val &= ~0x02; val |= 0x01; analog_write(areg_0e_pa0_pa3_pull, val); }while(0)
680 #define GPIO_PA0_PULL_DOWN_100K do{ unsigned char val = analog_read(areg_0e_pa0_pa3_pull); val |= 0x02; val &= ~0x01; analog_write(areg_0e_pa0_pa3_pull, val); }while(0)
681 #define GPIO_PA0_PULL_UP_10K do{ unsigned char val = analog_read(areg_0e_pa0_pa3_pull); val |= 0x03; analog_write(areg_0e_pa0_pa3_pull, val); }while(0)
682 #define GPIO_PA0_PULL_TOGGLE do{ unsigned char val = analog_read(areg_0e_pa0_pa3_pull); val ^= 0x01; analog_write(areg_0e_pa0_pa3_pull, val); }while(0)
683 
684 
685 
686 #define GPIO_PA1_PULL_FLOAT do{ unsigned char val = analog_read(areg_0e_pa0_pa3_pull); val &= ~0x0C; analog_write(areg_0e_pa0_pa3_pull, val); }while(0)
687 #define GPIO_PA1_PULL_UP_1M do{ unsigned char val = analog_read(areg_0e_pa0_pa3_pull); val &= ~0x08; val |= 0x04; analog_write(areg_0e_pa0_pa3_pull, val); }while(0)
688 #define GPIO_PA1_PULL_DOWN_100K do{ unsigned char val = analog_read(areg_0e_pa0_pa3_pull); val |= 0x08; val &= ~0x04; analog_write(areg_0e_pa0_pa3_pull, val); }while(0)
689 #define GPIO_PA1_PULL_UP_10K do{ unsigned char val = analog_read(areg_0e_pa0_pa3_pull); val |= 0x0C; analog_write(areg_0e_pa0_pa3_pull, val); }while(0)
690 #define GPIO_PA1_PULL_TOGGLE do{ unsigned char val = analog_read(areg_0e_pa0_pa3_pull); val ^= 0x04; analog_write(areg_0e_pa0_pa3_pull, val); }while(0)
691 
692 
693 #define GPIO_PA2_PULL_FLOAT do{ unsigned char val = analog_read(areg_0e_pa0_pa3_pull); val &= ~0x30; analog_write(areg_0e_pa0_pa3_pull, val); }while(0)
694 #define GPIO_PA2_PULL_UP_1M do{ unsigned char val = analog_read(areg_0e_pa0_pa3_pull); val &= ~0x20; val |= 0x10; analog_write(areg_0e_pa0_pa3_pull, val); }while(0)
695 #define GPIO_PA2_PULL_DOWN_100K do{ unsigned char val = analog_read(areg_0e_pa0_pa3_pull); val |= 0x20; val &= ~0x10; analog_write(areg_0e_pa0_pa3_pull, val); }while(0)
696 #define GPIO_PA2_PULL_UP_10K do{ unsigned char val = analog_read(areg_0e_pa0_pa3_pull); val |= 0x30; analog_write(areg_0e_pa0_pa3_pull, val); }while(0)
697 #define GPIO_PA2_PULL_TOGGLE do{ unsigned char val = analog_read(areg_0e_pa0_pa3_pull); val ^= 0x10; analog_write(areg_0e_pa0_pa3_pull, val); }while(0)
698 
699 
700 #define GPIO_PA3_PULL_FLOAT do{ unsigned char val = analog_read(areg_0e_pa0_pa3_pull); val &= ~0xC0; analog_write(areg_0e_pa0_pa3_pull, val); }while(0)
701 #define GPIO_PA3_PULL_UP_1M do{ unsigned char val = analog_read(areg_0e_pa0_pa3_pull); val &= ~0x80; val |= 0x40; analog_write(areg_0e_pa0_pa3_pull, val); }while(0)
702 #define GPIO_PA3_PULL_DOWN_100K do{ unsigned char val = analog_read(areg_0e_pa0_pa3_pull); val |= 0x80; val &= ~0x40; analog_write(areg_0e_pa0_pa3_pull, val); }while(0)
703 #define GPIO_PA3_PULL_UP_10K do{ unsigned char val = analog_read(areg_0e_pa0_pa3_pull); val |= 0xC0; analog_write(areg_0e_pa0_pa3_pull, val); }while(0)
704 #define GPIO_PA3_PULL_TOGGLE do{ unsigned char val = analog_read(areg_0e_pa0_pa3_pull); val ^= 0x40; analog_write(areg_0e_pa0_pa3_pull, val); }while(0)
705 
706 #define GPIO_PA4_PULL_FLOAT do{ unsigned char val = analog_read(areg_0f_pa4_pa7_pull); val &= ~0x03; analog_write(areg_0f_pa4_pa7_pull, val); }while(0)
707 #define GPIO_PA4_PULL_UP_1M do{ unsigned char val = analog_read(areg_0f_pa4_pa7_pull); val &= ~0x02; val |= 0x01; analog_write(areg_0f_pa4_pa7_pull, val); }while(0)
708 #define GPIO_PA4_PULL_DOWN_100K do{ unsigned char val = analog_read(areg_0f_pa4_pa7_pull); val |= 0x02; val &= ~0x01; analog_write(areg_0f_pa4_pa7_pull, val); }while(0)
709 #define GPIO_PA4_PULL_UP_10K do{ unsigned char val = analog_read(areg_0f_pa4_pa7_pull); val |= 0x03; analog_write(areg_0f_pa4_pa7_pull, val); }while(0)
710 #define GPIO_PA4_PULL_TOGGLE do{ unsigned char val = analog_read(areg_0f_pa4_pa7_pull); val ^= 0x01; analog_write(areg_0f_pa4_pa7_pull, val); }while(0)
711 
712 
713 #define GPIO_PA5_PULL_FLOAT do{ unsigned char val = analog_read(areg_0f_pa4_pa7_pull); val &= ~0x0C; analog_write(areg_0f_pa4_pa7_pull, val); }while(0)
714 #define GPIO_PA5_PULL_UP_1M do{ unsigned char val = analog_read(areg_0f_pa4_pa7_pull); val &= ~0x08; val |= 0x04; analog_write(areg_0f_pa4_pa7_pull, val); }while(0)
715 #define GPIO_PA5_PULL_DOWN_100K do{ unsigned char val = analog_read(areg_0f_pa4_pa7_pull); val |= 0x08; val &= ~0x04; analog_write(areg_0f_pa4_pa7_pull, val); }while(0)
716 #define GPIO_PA5_PULL_UP_10K do{ unsigned char val = analog_read(areg_0f_pa4_pa7_pull); val |= 0x0C; analog_write(areg_0f_pa4_pa7_pull, val); }while(0)
717 #define GPIO_PA5_PULL_TOGGLE do{ unsigned char val = analog_read(areg_0f_pa4_pa7_pull); val ^= 0x04; analog_write(areg_0f_pa4_pa7_pull, val); }while(0)
718 
719 #define GPIO_PA6_PULL_FLOAT do{ unsigned char val = analog_read(areg_0f_pa4_pa7_pull); val &= ~0x30; analog_write(areg_0f_pa4_pa7_pull, val); }while(0)
720 #define GPIO_PA6_PULL_UP_1M do{ unsigned char val = analog_read(areg_0f_pa4_pa7_pull); val &= ~0x20; val |= 0x10; analog_write(areg_0f_pa4_pa7_pull, val); }while(0)
721 #define GPIO_PA6_PULL_DOWN_100K do{ unsigned char val = analog_read(areg_0f_pa4_pa7_pull); val |= 0x20; val &= ~0x10; analog_write(areg_0f_pa4_pa7_pull, val); }while(0)
722 #define GPIO_PA6_PULL_UP_10K do{ unsigned char val = analog_read(areg_0f_pa4_pa7_pull); val |= 0x30; analog_write(areg_0f_pa4_pa7_pull, val); }while(0)
723 #define GPIO_PA6_PULL_TOGGLE do{ unsigned char val = analog_read(areg_0f_pa4_pa7_pull); val ^= 0x10; analog_write(areg_0f_pa4_pa7_pull, val); }while(0)
724 
725 #define GPIO_PA7_PULL_FLOAT do{ unsigned char val = analog_read(areg_0f_pa4_pa7_pull); val &= ~0xC0; analog_write(areg_0f_pa4_pa7_pull, val); }while(0)
726 #define GPIO_PA7_PULL_UP_1M do{ unsigned char val = analog_read(areg_0f_pa4_pa7_pull); val &= ~0x80; val |= 0x40; analog_write(areg_0f_pa4_pa7_pull, val); }while(0)
727 #define GPIO_PA7_PULL_DOWN_100K do{ unsigned char val = analog_read(areg_0f_pa4_pa7_pull); val |= 0x80; val &= ~0x40; analog_write(areg_0f_pa4_pa7_pull, val); }while(0)
728 #define GPIO_PA7_PULL_UP_10K do{ unsigned char val = analog_read(areg_0f_pa4_pa7_pull); val |= 0xC0; analog_write(areg_0f_pa4_pa7_pull, val); }while(0)
729 #define GPIO_PA7_PULL_TOGGLE do{ unsigned char val = analog_read(areg_0f_pa4_pa7_pull); val ^= 0x40; analog_write(areg_0f_pa4_pa7_pull, val); }while(0)
730 
731 
732 
733 
734 
735 
736 #define GPIO_PB0_PULL_FLOAT do{ unsigned char val = analog_read(areg_10_pb0_pb3_pull); val &= ~0x03; analog_write(areg_10_pb0_pb3_pull, val); }while(0)
737 #define GPIO_PB0_PULL_UP_1M do{ unsigned char val = analog_read(areg_10_pb0_pb3_pull); val &= ~0x02; val |= 0x01; analog_write(areg_10_pb0_pb3_pull, val); }while(0)
738 #define GPIO_PB0_PULL_DOWN_100K do{ unsigned char val = analog_read(areg_10_pb0_pb3_pull); val |= 0x02; val &= ~0x01; analog_write(areg_10_pb0_pb3_pull, val); }while(0)
739 #define GPIO_PB0_PULL_UP_10K do{ unsigned char val = analog_read(areg_10_pb0_pb3_pull); val |= 0x03; analog_write(areg_10_pb0_pb3_pull, val); }while(0)
740 #define GPIO_PB0_PULL_TOGGLE do{ unsigned char val = analog_read(areg_10_pb0_pb3_pull); val ^= 0x01; analog_write(areg_10_pb0_pb3_pull, val); }while(0)
741 
742 
743 
744 #define GPIO_PB1_PULL_FLOAT do{ unsigned char val = analog_read(areg_10_pb0_pb3_pull); val &= ~0x0C; analog_write(areg_10_pb0_pb3_pull, val); }while(0)
745 #define GPIO_PB1_PULL_UP_1M do{ unsigned char val = analog_read(areg_10_pb0_pb3_pull); val &= ~0x08; val |= 0x04; analog_write(areg_10_pb0_pb3_pull, val); }while(0)
746 #define GPIO_PB1_PULL_DOWN_100K do{ unsigned char val = analog_read(areg_10_pb0_pb3_pull); val |= 0x08; val &= ~0x04; analog_write(areg_10_pb0_pb3_pull, val); }while(0)
747 #define GPIO_PB1_PULL_UP_10K do{ unsigned char val = analog_read(areg_10_pb0_pb3_pull); val |= 0x0C; analog_write(areg_10_pb0_pb3_pull, val); }while(0)
748 #define GPIO_PB1_PULL_TOGGLE do{ unsigned char val = analog_read(areg_10_pb0_pb3_pull); val ^= 0x04; analog_write(areg_10_pb0_pb3_pull, val); }while(0)
749 
750 
751 #define GPIO_PB2_PULL_FLOAT do{ unsigned char val = analog_read(areg_10_pb0_pb3_pull); val &= ~0x30; analog_write(areg_10_pb0_pb3_pull, val); }while(0)
752 #define GPIO_PB2_PULL_UP_1M do{ unsigned char val = analog_read(areg_10_pb0_pb3_pull); val &= ~0x20; val |= 0x10; analog_write(areg_10_pb0_pb3_pull, val); }while(0)
753 #define GPIO_PB2_PULL_DOWN_100K do{ unsigned char val = analog_read(areg_10_pb0_pb3_pull); val |= 0x20; val &= ~0x10; analog_write(areg_10_pb0_pb3_pull, val); }while(0)
754 #define GPIO_PB2_PULL_UP_10K do{ unsigned char val = analog_read(areg_10_pb0_pb3_pull); val |= 0x30; analog_write(areg_10_pb0_pb3_pull, val); }while(0)
755 #define GPIO_PB2_PULL_TOGGLE do{ unsigned char val = analog_read(areg_10_pb0_pb3_pull); val ^= 0x10; analog_write(areg_10_pb0_pb3_pull, val); }while(0)
756 
757 
758 #define GPIO_PB3_PULL_FLOAT do{ unsigned char val = analog_read(areg_10_pb0_pb3_pull); val &= ~0xC0; analog_write(areg_10_pb0_pb3_pull, val); }while(0)
759 #define GPIO_PB3_PULL_UP_1M do{ unsigned char val = analog_read(areg_10_pb0_pb3_pull); val &= ~0x80; val |= 0x40; analog_write(areg_10_pb0_pb3_pull, val); }while(0)
760 #define GPIO_PB3_PULL_DOWN_100K do{ unsigned char val = analog_read(areg_10_pb0_pb3_pull); val |= 0x80; val &= ~0x40; analog_write(areg_10_pb0_pb3_pull, val); }while(0)
761 #define GPIO_PB3_PULL_UP_10K do{ unsigned char val = analog_read(areg_10_pb0_pb3_pull); val |= 0xC0; analog_write(areg_10_pb0_pb3_pull, val); }while(0)
762 #define GPIO_PB3_PULL_TOGGLE do{ unsigned char val = analog_read(areg_10_pb0_pb3_pull); val ^= 0x40; analog_write(areg_10_pb0_pb3_pull, val); }while(0)
763 
764 #define GPIO_PB4_PULL_FLOAT do{ unsigned char val = analog_read(areg_11_pb4_pb7_pull); val &= ~0x03; analog_write(areg_11_pb4_pb7_pull, val); }while(0)
765 #define GPIO_PB4_PULL_UP_1M do{ unsigned char val = analog_read(areg_11_pb4_pb7_pull); val &= ~0x02; val |= 0x01; analog_write(areg_11_pb4_pb7_pull, val); }while(0)
766 #define GPIO_PB4_PULL_DOWN_100K do{ unsigned char val = analog_read(areg_11_pb4_pb7_pull); val |= 0x02; val &= ~0x01; analog_write(areg_11_pb4_pb7_pull, val); }while(0)
767 #define GPIO_PB4_PULL_UP_10K do{ unsigned char val = analog_read(areg_11_pb4_pb7_pull); val |= 0x03; analog_write(areg_11_pb4_pb7_pull, val); }while(0)
768 #define GPIO_PB4_PULL_TOGGLE do{ unsigned char val = analog_read(areg_11_pb4_pb7_pull); val ^= 0x01; analog_write(areg_11_pb4_pb7_pull, val); }while(0)
769 
770 
771 #define GPIO_PB5_PULL_FLOAT do{ unsigned char val = analog_read(areg_11_pb4_pb7_pull); val &= ~0x0C; analog_write(areg_11_pb4_pb7_pull, val); }while(0)
772 #define GPIO_PB5_PULL_UP_1M do{ unsigned char val = analog_read(areg_11_pb4_pb7_pull); val &= ~0x08; val |= 0x04; analog_write(areg_11_pb4_pb7_pull, val); }while(0)
773 #define GPIO_PB5_PULL_DOWN_100K do{ unsigned char val = analog_read(areg_11_pb4_pb7_pull); val |= 0x08; val &= ~0x04; analog_write(areg_11_pb4_pb7_pull, val); }while(0)
774 #define GPIO_PB5_PULL_UP_10K do{ unsigned char val = analog_read(areg_11_pb4_pb7_pull); val |= 0x0C; analog_write(areg_11_pb4_pb7_pull, val); }while(0)
775 #define GPIO_PB5_PULL_TOGGLE do{ unsigned char val = analog_read(areg_11_pb4_pb7_pull); val ^= 0x04; analog_write(areg_11_pb4_pb7_pull, val); }while(0)
776 
777 #define GPIO_PB6_PULL_FLOAT do{ unsigned char val = analog_read(areg_11_pb4_pb7_pull); val &= ~0x30; analog_write(areg_11_pb4_pb7_pull, val); }while(0)
778 #define GPIO_PB6_PULL_UP_1M do{ unsigned char val = analog_read(areg_11_pb4_pb7_pull); val &= ~0x20; val |= 0x10; analog_write(areg_11_pb4_pb7_pull, val); }while(0)
779 #define GPIO_PB6_PULL_DOWN_100K do{ unsigned char val = analog_read(areg_11_pb4_pb7_pull); val |= 0x20; val &= ~0x10; analog_write(areg_11_pb4_pb7_pull, val); }while(0)
780 #define GPIO_PB6_PULL_UP_10K do{ unsigned char val = analog_read(areg_11_pb4_pb7_pull); val |= 0x30; analog_write(areg_11_pb4_pb7_pull, val); }while(0)
781 #define GPIO_PB6_PULL_TOGGLE do{ unsigned char val = analog_read(areg_11_pb4_pb7_pull); val ^= 0x10; analog_write(areg_11_pb4_pb7_pull, val); }while(0)
782 
783 #define GPIO_PB7_PULL_FLOAT do{ unsigned char val = analog_read(areg_11_pb4_pb7_pull); val &= ~0xC0; analog_write(areg_11_pb4_pb7_pull, val); }while(0)
784 #define GPIO_PB7_PULL_UP_1M do{ unsigned char val = analog_read(areg_11_pb4_pb7_pull); val &= ~0x80; val |= 0x40; analog_write(areg_11_pb4_pb7_pull, val); }while(0)
785 #define GPIO_PB7_PULL_DOWN_100K do{ unsigned char val = analog_read(areg_11_pb4_pb7_pull); val |= 0x80; val &= ~0x40; analog_write(areg_11_pb4_pb7_pull, val); }while(0)
786 #define GPIO_PB7_PULL_UP_10K do{ unsigned char val = analog_read(areg_11_pb4_pb7_pull); val |= 0xC0; analog_write(areg_11_pb4_pb7_pull, val); }while(0)
787 #define GPIO_PB7_PULL_TOGGLE do{ unsigned char val = analog_read(areg_11_pb4_pb7_pull); val ^= 0x40; analog_write(areg_11_pb4_pb7_pull, val); }while(0)
788 
789 
790 
791 #define GPIO_PC0_PULL_FLOAT do{ unsigned char val = analog_read(areg_12_pc0_pc3_pull); val &= ~0x03; analog_write(areg_12_pc0_pc3_pull, val); }while(0)
792 #define GPIO_PC0_PULL_UP_1M do{ unsigned char val = analog_read(areg_12_pc0_pc3_pull); val &= ~0x02; val |= 0x01; analog_write(areg_12_pc0_pc3_pull, val); }while(0)
793 #define GPIO_PC0_PULL_DOWN_100K do{ unsigned char val = analog_read(areg_12_pc0_pc3_pull); val |= 0x02; val &= ~0x01; analog_write(areg_12_pc0_pc3_pull, val); }while(0)
794 #define GPIO_PC0_PULL_UP_10K do{ unsigned char val = analog_read(areg_12_pc0_pc3_pull); val |= 0x03; analog_write(areg_12_pc0_pc3_pull, val); }while(0)
795 #define GPIO_PC0_PULL_TOGGLE do{ unsigned char val = analog_read(areg_12_pc0_pc3_pull); val ^= 0x01; analog_write(areg_12_pc0_pc3_pull, val); }while(0)
796 
797 
798 
799 #define GPIO_PC1_PULL_FLOAT do{ unsigned char val = analog_read(areg_12_pc0_pc3_pull); val &= ~0x0C; analog_write(areg_12_pc0_pc3_pull, val); }while(0)
800 #define GPIO_PC1_PULL_UP_1M do{ unsigned char val = analog_read(areg_12_pc0_pc3_pull); val &= ~0x08; val |= 0x04; analog_write(areg_12_pc0_pc3_pull, val); }while(0)
801 #define GPIO_PC1_PULL_DOWN_100K do{ unsigned char val = analog_read(areg_12_pc0_pc3_pull); val |= 0x08; val &= ~0x04; analog_write(areg_12_pc0_pc3_pull, val); }while(0)
802 #define GPIO_PC1_PULL_UP_10K do{ unsigned char val = analog_read(areg_12_pc0_pc3_pull); val |= 0x0C; analog_write(areg_12_pc0_pc3_pull, val); }while(0)
803 #define GPIO_PC1_PULL_TOGGLE do{ unsigned char val = analog_read(areg_12_pc0_pc3_pull); val ^= 0x04; analog_write(areg_12_pc0_pc3_pull, val); }while(0)
804 
805 
806 #define GPIO_PC2_PULL_FLOAT do{ unsigned char val = analog_read(areg_12_pc0_pc3_pull); val &= ~0x30; analog_write(areg_12_pc0_pc3_pull, val); }while(0)
807 #define GPIO_PC2_PULL_UP_1M do{ unsigned char val = analog_read(areg_12_pc0_pc3_pull); val &= ~0x20; val |= 0x10; analog_write(areg_12_pc0_pc3_pull, val); }while(0)
808 #define GPIO_PC2_PULL_DOWN_100K do{ unsigned char val = analog_read(areg_12_pc0_pc3_pull); val |= 0x20; val &= ~0x10; analog_write(areg_12_pc0_pc3_pull, val); }while(0)
809 #define GPIO_PC2_PULL_UP_10K do{ unsigned char val = analog_read(areg_12_pc0_pc3_pull); val |= 0x30; analog_write(areg_12_pc0_pc3_pull, val); }while(0)
810 #define GPIO_PC2_PULL_TOGGLE do{ unsigned char val = analog_read(areg_12_pc0_pc3_pull); val ^= 0x10; analog_write(areg_12_pc0_pc3_pull, val); }while(0)
811 
812 
813 #define GPIO_PC3_PULL_FLOAT do{ unsigned char val = analog_read(areg_12_pc0_pc3_pull); val &= ~0xC0; analog_write(areg_12_pc0_pc3_pull, val); }while(0)
814 #define GPIO_PC3_PULL_UP_1M do{ unsigned char val = analog_read(areg_12_pc0_pc3_pull); val &= ~0x80; val |= 0x40; analog_write(areg_12_pc0_pc3_pull, val); }while(0)
815 #define GPIO_PC3_PULL_DOWN_100K do{ unsigned char val = analog_read(areg_12_pc0_pc3_pull); val |= 0x80; val &= ~0x40; analog_write(areg_12_pc0_pc3_pull, val); }while(0)
816 #define GPIO_PC3_PULL_UP_10K do{ unsigned char val = analog_read(areg_12_pc0_pc3_pull); val |= 0xC0; analog_write(areg_12_pc0_pc3_pull, val); }while(0)
817 #define GPIO_PC3_PULL_TOGGLE do{ unsigned char val = analog_read(areg_12_pc0_pc3_pull); val ^= 0x40; analog_write(areg_12_pc0_pc3_pull, val); }while(0)
818 
819 #define GPIO_PC4_PULL_FLOAT do{ unsigned char val = analog_read(areg_13_pc4_pc7_pull); val &= ~0x03; analog_write(areg_13_pc4_pc7_pull, val); }while(0)
820 #define GPIO_PC4_PULL_UP_1M do{ unsigned char val = analog_read(areg_13_pc4_pc7_pull); val &= ~0x02; val |= 0x01; analog_write(areg_13_pc4_pc7_pull, val); }while(0)
821 #define GPIO_PC4_PULL_DOWN_100K do{ unsigned char val = analog_read(areg_13_pc4_pc7_pull); val |= 0x02; val &= ~0x01; analog_write(areg_13_pc4_pc7_pull, val); }while(0)
822 #define GPIO_PC4_PULL_UP_10K do{ unsigned char val = analog_read(areg_13_pc4_pc7_pull); val |= 0x03; analog_write(areg_13_pc4_pc7_pull, val); }while(0)
823 #define GPIO_PC4_PULL_TOGGLE do{ unsigned char val = analog_read(areg_13_pc4_pc7_pull); val ^= 0x01; analog_write(areg_13_pc4_pc7_pull, val); }while(0)
824 
825 
826 #define GPIO_PC5_PULL_FLOAT do{ unsigned char val = analog_read(areg_13_pc4_pc7_pull); val &= ~0x0C; analog_write(areg_13_pc4_pc7_pull, val); }while(0)
827 #define GPIO_PC5_PULL_UP_1M do{ unsigned char val = analog_read(areg_13_pc4_pc7_pull); val &= ~0x08; val |= 0x04; analog_write(areg_13_pc4_pc7_pull, val); }while(0)
828 #define GPIO_PC5_PULL_DOWN_100K do{ unsigned char val = analog_read(areg_13_pc4_pc7_pull); val |= 0x08; val &= ~0x04; analog_write(areg_13_pc4_pc7_pull, val); }while(0)
829 #define GPIO_PC5_PULL_UP_10K do{ unsigned char val = analog_read(areg_13_pc4_pc7_pull); val |= 0x0C; analog_write(areg_13_pc4_pc7_pull, val); }while(0)
830 #define GPIO_PC5_PULL_TOGGLE do{ unsigned char val = analog_read(areg_13_pc4_pc7_pull); val ^= 0x04; analog_write(areg_13_pc4_pc7_pull, val); }while(0)
831 
832 #define GPIO_PC6_PULL_FLOAT do{ unsigned char val = analog_read(areg_13_pc4_pc7_pull); val &= ~0x30; analog_write(areg_13_pc4_pc7_pull, val); }while(0)
833 #define GPIO_PC6_PULL_UP_1M do{ unsigned char val = analog_read(areg_13_pc4_pc7_pull); val &= ~0x20; val |= 0x10; analog_write(areg_13_pc4_pc7_pull, val); }while(0)
834 #define GPIO_PC6_PULL_DOWN_100K do{ unsigned char val = analog_read(areg_13_pc4_pc7_pull); val |= 0x20; val &= ~0x10; analog_write(areg_13_pc4_pc7_pull, val); }while(0)
835 #define GPIO_PC6_PULL_UP_10K do{ unsigned char val = analog_read(areg_13_pc4_pc7_pull); val |= 0x30; analog_write(areg_13_pc4_pc7_pull, val); }while(0)
836 #define GPIO_PC6_PULL_TOGGLE do{ unsigned char val = analog_read(areg_13_pc4_pc7_pull); val ^= 0x10; analog_write(areg_13_pc4_pc7_pull, val); }while(0)
837 
838 #define GPIO_PC7_PULL_FLOAT do{ unsigned char val = analog_read(areg_13_pc4_pc7_pull); val &= ~0xC0; analog_write(areg_13_pc4_pc7_pull, val); }while(0)
839 #define GPIO_PC7_PULL_UP_1M do{ unsigned char val = analog_read(areg_13_pc4_pc7_pull); val &= ~0x80; val |= 0x40; analog_write(areg_13_pc4_pc7_pull, val); }while(0)
840 #define GPIO_PC7_PULL_DOWN_100K do{ unsigned char val = analog_read(areg_13_pc4_pc7_pull); val |= 0x80; val &= ~0x40; analog_write(areg_13_pc4_pc7_pull, val); }while(0)
841 #define GPIO_PC7_PULL_UP_10K do{ unsigned char val = analog_read(areg_13_pc4_pc7_pull); val |= 0xC0; analog_write(areg_13_pc4_pc7_pull, val); }while(0)
842 #define GPIO_PC7_PULL_TOGGLE do{ unsigned char val = analog_read(areg_13_pc4_pc7_pull); val ^= 0x40; analog_write(areg_13_pc4_pc7_pull, val); }while(0)
843 
844 
845 
846 #define GPIO_PD0_PULL_FLOAT do{ unsigned char val = analog_read(areg_14_pd0_pd3_pull); val &= ~0x03; analog_write(areg_14_pd0_pd3_pull, val); }while(0)
847 #define GPIO_PD0_PULL_UP_1M do{ unsigned char val = analog_read(areg_14_pd0_pd3_pull); val &= ~0x02; val |= 0x01; analog_write(areg_14_pd0_pd3_pull, val); }while(0)
848 #define GPIO_PD0_PULL_DOWN_100K do{ unsigned char val = analog_read(areg_14_pd0_pd3_pull); val |= 0x02; val &= ~0x01; analog_write(areg_14_pd0_pd3_pull, val); }while(0)
849 #define GPIO_PD0_PULL_UP_10K do{ unsigned char val = analog_read(areg_14_pd0_pd3_pull); val |= 0x03; analog_write(areg_14_pd0_pd3_pull, val); }while(0)
850 #define GPIO_PD0_PULL_TOGGLE do{ unsigned char val = analog_read(areg_14_pd0_pd3_pull); val ^= 0x01; analog_write(areg_14_pd0_pd3_pull, val); }while(0)
851 
852 
853 
854 #define GPIO_PD1_PULL_FLOAT do{ unsigned char val = analog_read(areg_14_pd0_pd3_pull); val &= ~0x0C; analog_write(areg_14_pd0_pd3_pull, val); }while(0)
855 #define GPIO_PD1_PULL_UP_1M do{ unsigned char val = analog_read(areg_14_pd0_pd3_pull); val &= ~0x08; val |= 0x04; analog_write(areg_14_pd0_pd3_pull, val); }while(0)
856 #define GPIO_PD1_PULL_DOWN_100K do{ unsigned char val = analog_read(areg_14_pd0_pd3_pull); val |= 0x08; val &= ~0x04; analog_write(areg_14_pd0_pd3_pull, val); }while(0)
857 #define GPIO_PD1_PULL_UP_10K do{ unsigned char val = analog_read(areg_14_pd0_pd3_pull); val |= 0x0C; analog_write(areg_14_pd0_pd3_pull, val); }while(0)
858 #define GPIO_PD1_PULL_TOGGLE do{ unsigned char val = analog_read(areg_14_pd0_pd3_pull); val ^= 0x04; analog_write(areg_14_pd0_pd3_pull, val); }while(0)
859 
860 
861 #define GPIO_PD2_PULL_FLOAT do{ unsigned char val = analog_read(areg_14_pd0_pd3_pull); val &= ~0x30; analog_write(areg_14_pd0_pd3_pull, val); }while(0)
862 #define GPIO_PD2_PULL_UP_1M do{ unsigned char val = analog_read(areg_14_pd0_pd3_pull); val &= ~0x20; val |= 0x10; analog_write(areg_14_pd0_pd3_pull, val); }while(0)
863 #define GPIO_PD2_PULL_DOWN_100K do{ unsigned char val = analog_read(areg_14_pd0_pd3_pull); val |= 0x20; val &= ~0x10; analog_write(areg_14_pd0_pd3_pull, val); }while(0)
864 #define GPIO_PD2_PULL_UP_10K do{ unsigned char val = analog_read(areg_14_pd0_pd3_pull); val |= 0x30; analog_write(areg_14_pd0_pd3_pull, val); }while(0)
865 #define GPIO_PD2_PULL_TOGGLE do{ unsigned char val = analog_read(areg_14_pd0_pd3_pull); val ^= 0x10; analog_write(areg_14_pd0_pd3_pull, val); }while(0)
866 
867 
868 #define GPIO_PD3_PULL_FLOAT do{ unsigned char val = analog_read(areg_14_pd0_pd3_pull); val &= ~0xC0; analog_write(areg_14_pd0_pd3_pull, val); }while(0)
869 #define GPIO_PD3_PULL_UP_1M do{ unsigned char val = analog_read(areg_14_pd0_pd3_pull); val &= ~0x80; val |= 0x40; analog_write(areg_14_pd0_pd3_pull, val); }while(0)
870 #define GPIO_PD3_PULL_DOWN_100K do{ unsigned char val = analog_read(areg_14_pd0_pd3_pull); val |= 0x80; val &= ~0x40; analog_write(areg_14_pd0_pd3_pull, val); }while(0)
871 #define GPIO_PD3_PULL_UP_10K do{ unsigned char val = analog_read(areg_14_pd0_pd3_pull); val |= 0xC0; analog_write(areg_14_pd0_pd3_pull, val); }while(0)
872 #define GPIO_PD3_PULL_TOGGLE do{ unsigned char val = analog_read(areg_14_pd0_pd3_pull); val ^= 0x40; analog_write(areg_14_pd0_pd3_pull, val); }while(0)
873 
874 #define GPIO_PD4_PULL_FLOAT do{ unsigned char val = analog_read(areg_15_pd4_pd7_pull); val &= ~0x03; analog_write(areg_15_pd4_pd7_pull, val); }while(0)
875 #define GPIO_PD4_PULL_UP_1M do{ unsigned char val = analog_read(areg_15_pd4_pd7_pull); val &= ~0x02; val |= 0x01; analog_write(areg_15_pd4_pd7_pull, val); }while(0)
876 #define GPIO_PD4_PULL_DOWN_100K do{ unsigned char val = analog_read(areg_15_pd4_pd7_pull); val |= 0x02; val &= ~0x01; analog_write(areg_15_pd4_pd7_pull, val); }while(0)
877 #define GPIO_PD4_PULL_UP_10K do{ unsigned char val = analog_read(areg_15_pd4_pd7_pull); val |= 0x03; analog_write(areg_15_pd4_pd7_pull, val); }while(0)
878 #define GPIO_PD4_PULL_TOGGLE do{ unsigned char val = analog_read(areg_15_pd4_pd7_pull); val ^= 0x01; analog_write(areg_15_pd4_pd7_pull, val); }while(0)
879 
880 
881 #define GPIO_PD5_PULL_FLOAT do{ unsigned char val = analog_read(areg_15_pd4_pd7_pull); val &= ~0x0C; analog_write(areg_15_pd4_pd7_pull, val); }while(0)
882 #define GPIO_PD5_PULL_UP_1M do{ unsigned char val = analog_read(areg_15_pd4_pd7_pull); val &= ~0x08; val |= 0x04; analog_write(areg_15_pd4_pd7_pull, val); }while(0)
883 #define GPIO_PD5_PULL_DOWN_100K do{ unsigned char val = analog_read(areg_15_pd4_pd7_pull); val |= 0x08; val &= ~0x04; analog_write(areg_15_pd4_pd7_pull, val); }while(0)
884 #define GPIO_PD5_PULL_UP_10K do{ unsigned char val = analog_read(areg_15_pd4_pd7_pull); val |= 0x0C; analog_write(areg_15_pd4_pd7_pull, val); }while(0)
885 #define GPIO_PD5_PULL_TOGGLE do{ unsigned char val = analog_read(areg_15_pd4_pd7_pull); val ^= 0x04; analog_write(areg_15_pd4_pd7_pull, val); }while(0)
886 
887 #define GPIO_PD6_PULL_FLOAT do{ unsigned char val = analog_read(areg_15_pd4_pd7_pull); val &= ~0x30; analog_write(areg_15_pd4_pd7_pull, val); }while(0)
888 #define GPIO_PD6_PULL_UP_1M do{ unsigned char val = analog_read(areg_15_pd4_pd7_pull); val &= ~0x20; val |= 0x10; analog_write(areg_15_pd4_pd7_pull, val); }while(0)
889 #define GPIO_PD6_PULL_DOWN_100K do{ unsigned char val = analog_read(areg_15_pd4_pd7_pull); val |= 0x20; val &= ~0x10; analog_write(areg_15_pd4_pd7_pull, val); }while(0)
890 #define GPIO_PD6_PULL_UP_10K do{ unsigned char val = analog_read(areg_15_pd4_pd7_pull); val |= 0x30; analog_write(areg_15_pd4_pd7_pull, val); }while(0)
891 #define GPIO_PD6_PULL_TOGGLE do{ unsigned char val = analog_read(areg_15_pd4_pd7_pull); val ^= 0x10; analog_write(areg_15_pd4_pd7_pull, val); }while(0)
892 
893 #define GPIO_PD7_PULL_FLOAT do{ unsigned char val = analog_read(areg_15_pd4_pd7_pull); val &= ~0xC0; analog_write(areg_15_pd4_pd7_pull, val); }while(0)
894 #define GPIO_PD7_PULL_UP_1M do{ unsigned char val = analog_read(areg_15_pd4_pd7_pull); val &= ~0x80; val |= 0x40; analog_write(areg_15_pd4_pd7_pull, val); }while(0)
895 #define GPIO_PD7_PULL_DOWN_100K do{ unsigned char val = analog_read(areg_15_pd4_pd7_pull); val |= 0x80; val &= ~0x40; analog_write(areg_15_pd4_pd7_pull, val); }while(0)
896 #define GPIO_PD7_PULL_UP_10K do{ unsigned char val = analog_read(areg_15_pd4_pd7_pull); val |= 0xC0; analog_write(areg_15_pd4_pd7_pull, val); }while(0)
897 #define GPIO_PD7_PULL_TOGGLE do{ unsigned char val = analog_read(areg_15_pd4_pd7_pull); val ^= 0x40; analog_write(areg_15_pd4_pd7_pull, val); }while(0)
898 
899 
900 #define GPIO_PA0_OUTPUT_LOW ( (*(volatile unsigned char *)0x800583) &= (~0x01) )
901 #define GPIO_PA0_OUTPUT_HIGH ( (*(volatile unsigned char *)0x800583) |= 0x01 )
902 #define GPIO_PA0_OUTPUT_TOGGLE ( (*(volatile unsigned char *)0x800583) ^= 0x01 )
903 #define GPIO_PA1_OUTPUT_LOW ( (*(volatile unsigned char *)0x800583) &= (~0x02) )
904 #define GPIO_PA1_OUTPUT_HIGH ( (*(volatile unsigned char *)0x800583) |= 0x02 )
905 #define GPIO_PA1_OUTPUT_TOGGLE ( (*(volatile unsigned char *)0x800583) ^= 0x02 )
906 #define GPIO_PA2_OUTPUT_LOW ( (*(volatile unsigned char *)0x800583) &= (~0x04) )
907 #define GPIO_PA2_OUTPUT_HIGH ( (*(volatile unsigned char *)0x800583) |= 0x04 )
908 #define GPIO_PA2_OUTPUT_TOGGLE ( (*(volatile unsigned char *)0x800583) ^= 0x04 )
909 #define GPIO_PA3_OUTPUT_LOW ( (*(volatile unsigned char *)0x800583) &= (~0x08) )
910 #define GPIO_PA3_OUTPUT_HIGH ( (*(volatile unsigned char *)0x800583) |= 0x08 )
911 #define GPIO_PA3_OUTPUT_TOGGLE ( (*(volatile unsigned char *)0x800583) ^= 0x08 )
912 #define GPIO_PA4_OUTPUT_LOW ( (*(volatile unsigned char *)0x800583) &= (~0x10) )
913 #define GPIO_PA4_OUTPUT_HIGH ( (*(volatile unsigned char *)0x800583) |= 0x10 )
914 #define GPIO_PA4_OUTPUT_TOGGLE ( (*(volatile unsigned char *)0x800583) ^= 0x10 )
915 #define GPIO_PA5_OUTPUT_LOW ( (*(volatile unsigned char *)0x800583) &= (~0x20) )
916 #define GPIO_PA5_OUTPUT_HIGH ( (*(volatile unsigned char *)0x800583) |= 0x20 )
917 #define GPIO_PA5_OUTPUT_TOGGLE ( (*(volatile unsigned char *)0x800583) ^= 0x20 )
918 #define GPIO_PA6_OUTPUT_LOW ( (*(volatile unsigned char *)0x800583) &= (~0x40) )
919 #define GPIO_PA6_OUTPUT_HIGH ( (*(volatile unsigned char *)0x800583) |= 0x40 )
920 #define GPIO_PA6_OUTPUT_TOGGLE ( (*(volatile unsigned char *)0x800583) ^= 0x40 )
921 #define GPIO_PA7_OUTPUT_LOW ( (*(volatile unsigned char *)0x800583) &= (~0x80) )
922 #define GPIO_PA7_OUTPUT_HIGH ( (*(volatile unsigned char *)0x800583) |= 0x80 )
923 #define GPIO_PA7_OUTPUT_TOGGLE ( (*(volatile unsigned char *)0x800583) ^= 0x80 )
924 
925 #define GPIO_PB0_OUTPUT_LOW ( (*(volatile unsigned char *)0x80058b) &= (~0x01) )
926 #define GPIO_PB0_OUTPUT_HIGH ( (*(volatile unsigned char *)0x80058b) |= 0x01 )
927 #define GPIO_PB0_OUTPUT_TOGGLE ( (*(volatile unsigned char *)0x80058b) ^= 0x01 )
928 #define GPIO_PB1_OUTPUT_LOW ( (*(volatile unsigned char *)0x80058b) &= (~0x02) )
929 #define GPIO_PB1_OUTPUT_HIGH ( (*(volatile unsigned char *)0x80058b) |= 0x02 )
930 #define GPIO_PB1_OUTPUT_TOGGLE ( (*(volatile unsigned char *)0x80058b) ^= 0x02 )
931 #define GPIO_PB2_OUTPUT_LOW ( (*(volatile unsigned char *)0x80058b) &= (~0x04) )
932 #define GPIO_PB2_OUTPUT_HIGH ( (*(volatile unsigned char *)0x80058b) |= 0x04 )
933 #define GPIO_PB2_OUTPUT_TOGGLE ( (*(volatile unsigned char *)0x80058b) ^= 0x04 )
934 #define GPIO_PB3_OUTPUT_LOW ( (*(volatile unsigned char *)0x80058b) &= (~0x08) )
935 #define GPIO_PB3_OUTPUT_HIGH ( (*(volatile unsigned char *)0x80058b) |= 0x08 )
936 #define GPIO_PB3_OUTPUT_TOGGLE ( (*(volatile unsigned char *)0x80058b) ^= 0x08 )
937 #define GPIO_PB4_OUTPUT_LOW ( (*(volatile unsigned char *)0x80058b) &= (~0x10) )
938 #define GPIO_PB4_OUTPUT_HIGH ( (*(volatile unsigned char *)0x80058b) |= 0x10 )
939 #define GPIO_PB4_OUTPUT_TOGGLE ( (*(volatile unsigned char *)0x80058b) ^= 0x10 )
940 #define GPIO_PB5_OUTPUT_LOW ( (*(volatile unsigned char *)0x80058b) &= (~0x20) )
941 #define GPIO_PB5_OUTPUT_HIGH ( (*(volatile unsigned char *)0x80058b) |= 0x20 )
942 #define GPIO_PB5_OUTPUT_TOGGLE ( (*(volatile unsigned char *)0x80058b) ^= 0x20 )
943 #define GPIO_PB6_OUTPUT_LOW ( (*(volatile unsigned char *)0x80058b) &= (~0x40) )
944 #define GPIO_PB6_OUTPUT_HIGH ( (*(volatile unsigned char *)0x80058b) |= 0x40 )
945 #define GPIO_PB6_OUTPUT_TOGGLE ( (*(volatile unsigned char *)0x80058b) ^= 0x40 )
946 #define GPIO_PB7_OUTPUT_LOW ( (*(volatile unsigned char *)0x80058b) &= (~0x80) )
947 #define GPIO_PB7_OUTPUT_HIGH ( (*(volatile unsigned char *)0x80058b) |= 0x80 )
948 #define GPIO_PB7_OUTPUT_TOGGLE ( (*(volatile unsigned char *)0x80058b) ^= 0x80 )
949 
950 #define GPIO_PC0_OUTPUT_LOW ( (*(volatile unsigned char *)0x800593) &= (~0x01) )
951 #define GPIO_PC0_OUTPUT_HIGH ( (*(volatile unsigned char *)0x800593) |= 0x01 )
952 #define GPIO_PC0_OUTPUT_TOGGLE ( (*(volatile unsigned char *)0x800593) ^= 0x01 )
953 #define GPIO_PC1_OUTPUT_LOW ( (*(volatile unsigned char *)0x800593) &= (~0x02) )
954 #define GPIO_PC1_OUTPUT_HIGH ( (*(volatile unsigned char *)0x800593) |= 0x02 )
955 #define GPIO_PC1_OUTPUT_TOGGLE ( (*(volatile unsigned char *)0x800593) ^= 0x02 )
956 #define GPIO_PC2_OUTPUT_LOW ( (*(volatile unsigned char *)0x800593) &= (~0x04) )
957 #define GPIO_PC2_OUTPUT_HIGH ( (*(volatile unsigned char *)0x800593) |= 0x04 )
958 #define GPIO_PC2_OUTPUT_TOGGLE ( (*(volatile unsigned char *)0x800593) ^= 0x04 )
959 #define GPIO_PC3_OUTPUT_LOW ( (*(volatile unsigned char *)0x800593) &= (~0x08) )
960 #define GPIO_PC3_OUTPUT_HIGH ( (*(volatile unsigned char *)0x800593) |= 0x08 )
961 #define GPIO_PC3_OUTPUT_TOGGLE ( (*(volatile unsigned char *)0x800593) ^= 0x08 )
962 #define GPIO_PC4_OUTPUT_LOW ( (*(volatile unsigned char *)0x800593) &= (~0x10) )
963 #define GPIO_PC4_OUTPUT_HIGH ( (*(volatile unsigned char *)0x800593) |= 0x10 )
964 #define GPIO_PC4_OUTPUT_TOGGLE ( (*(volatile unsigned char *)0x800593) ^= 0x10 )
965 #define GPIO_PC5_OUTPUT_LOW ( (*(volatile unsigned char *)0x800593) &= (~0x20) )
966 #define GPIO_PC5_OUTPUT_HIGH ( (*(volatile unsigned char *)0x800593) |= 0x20 )
967 #define GPIO_PC5_OUTPUT_TOGGLE ( (*(volatile unsigned char *)0x800593) ^= 0x20 )
968 #define GPIO_PC6_OUTPUT_LOW ( (*(volatile unsigned char *)0x800593) &= (~0x40) )
969 #define GPIO_PC6_OUTPUT_HIGH ( (*(volatile unsigned char *)0x800593) |= 0x40 )
970 #define GPIO_PC6_OUTPUT_TOGGLE ( (*(volatile unsigned char *)0x800593) ^= 0x40 )
971 #define GPIO_PC7_OUTPUT_LOW ( (*(volatile unsigned char *)0x800593) &= (~0x80) )
972 #define GPIO_PC7_OUTPUT_HIGH ( (*(volatile unsigned char *)0x800593) |= 0x80 )
973 #define GPIO_PC7_OUTPUT_TOGGLE ( (*(volatile unsigned char *)0x800593) ^= 0x80 )
974 
975 #define GPIO_PD0_OUTPUT_LOW ( (*(volatile unsigned char *)0x80059b) &= (~0x01) )
976 #define GPIO_PD0_OUTPUT_HIGH ( (*(volatile unsigned char *)0x80059b) |= 0x01 )
977 #define GPIO_PD0_OUTPUT_TOGGLE ( (*(volatile unsigned char *)0x80059b) ^= 0x01 )
978 #define GPIO_PD1_OUTPUT_LOW ( (*(volatile unsigned char *)0x80059b) &= (~0x02) )
979 #define GPIO_PD1_OUTPUT_HIGH ( (*(volatile unsigned char *)0x80059b) |= 0x02 )
980 #define GPIO_PD1_OUTPUT_TOGGLE ( (*(volatile unsigned char *)0x80059b) ^= 0x02 )
981 #define GPIO_PD2_OUTPUT_LOW ( (*(volatile unsigned char *)0x80059b) &= (~0x04) )
982 #define GPIO_PD2_OUTPUT_HIGH ( (*(volatile unsigned char *)0x80059b) |= 0x04 )
983 #define GPIO_PD2_OUTPUT_TOGGLE ( (*(volatile unsigned char *)0x80059b) ^= 0x04 )
984 #define GPIO_PD3_OUTPUT_LOW ( (*(volatile unsigned char *)0x80059b) &= (~0x08) )
985 #define GPIO_PD3_OUTPUT_HIGH ( (*(volatile unsigned char *)0x80059b) |= 0x08 )
986 #define GPIO_PD3_OUTPUT_TOGGLE ( (*(volatile unsigned char *)0x80059b) ^= 0x08 )
987 #define GPIO_PD4_OUTPUT_LOW ( (*(volatile unsigned char *)0x80059b) &= (~0x10) )
988 #define GPIO_PD4_OUTPUT_HIGH ( (*(volatile unsigned char *)0x80059b) |= 0x10 )
989 #define GPIO_PD4_OUTPUT_TOGGLE ( (*(volatile unsigned char *)0x80059b) ^= 0x10 )
990 #define GPIO_PD5_OUTPUT_LOW ( (*(volatile unsigned char *)0x80059b) &= (~0x20) )
991 #define GPIO_PD5_OUTPUT_HIGH ( (*(volatile unsigned char *)0x80059b) |= 0x20 )
992 #define GPIO_PD5_OUTPUT_TOGGLE ( (*(volatile unsigned char *)0x80059b) ^= 0x20 )
993 #define GPIO_PD6_OUTPUT_LOW ( (*(volatile unsigned char *)0x80059b) &= (~0x40) )
994 #define GPIO_PD6_OUTPUT_HIGH ( (*(volatile unsigned char *)0x80059b) |= 0x40 )
995 #define GPIO_PD6_OUTPUT_TOGGLE ( (*(volatile unsigned char *)0x80059b) ^= 0x40 )
996 #define GPIO_PD7_OUTPUT_LOW ( (*(volatile unsigned char *)0x80059b) &= (~0x80) )
997 #define GPIO_PD7_OUTPUT_HIGH ( (*(volatile unsigned char *)0x80059b) |= 0x80 )
998 #define GPIO_PD7_OUTPUT_TOGGLE ( (*(volatile unsigned char *)0x80059b) ^= 0x80 )