Initial import of onewire-to-usb bridge
[onewire] / build / XC8_12F1822 / production / main.pre
1
2 # 1 "main.c"
3
4 # 44 "/opt/microchip/xc8/v1.12/include/pic12f1822.h"
5 extern volatile unsigned char INDF0 @ 0x000;
6
7 asm("INDF0 equ 00h");
8
9
10 typedef union {
11 struct {
12 unsigned INDF0 :8;
13 };
14 } INDF0bits_t;
15 extern volatile INDF0bits_t INDF0bits @ 0x000;
16
17 # 63
18 extern volatile unsigned char INDF1 @ 0x001;
19
20 asm("INDF1 equ 01h");
21
22
23 typedef union {
24 struct {
25 unsigned INDF1 :8;
26 };
27 } INDF1bits_t;
28 extern volatile INDF1bits_t INDF1bits @ 0x001;
29
30 # 82
31 extern volatile unsigned char PCL @ 0x002;
32
33 asm("PCL equ 02h");
34
35
36 typedef union {
37 struct {
38 unsigned PCL :8;
39 };
40 } PCLbits_t;
41 extern volatile PCLbits_t PCLbits @ 0x002;
42
43 # 101
44 extern volatile unsigned char STATUS @ 0x003;
45
46 asm("STATUS equ 03h");
47
48
49 typedef union {
50 struct {
51 unsigned C :1;
52 unsigned DC :1;
53 unsigned Z :1;
54 unsigned nPD :1;
55 unsigned nTO :1;
56 };
57 struct {
58 unsigned CARRY :1;
59 };
60 struct {
61 unsigned :2;
62 unsigned ZERO :1;
63 };
64 } STATUSbits_t;
65 extern volatile STATUSbits_t STATUSbits @ 0x003;
66
67 # 161
68 extern volatile unsigned short FSR0 @ 0x004;
69
70
71 extern volatile unsigned char FSR0L @ 0x004;
72
73 asm("FSR0L equ 04h");
74
75
76 typedef union {
77 struct {
78 unsigned FSR0L :8;
79 };
80 } FSR0Lbits_t;
81 extern volatile FSR0Lbits_t FSR0Lbits @ 0x004;
82
83 # 183
84 extern volatile unsigned char FSR0H @ 0x005;
85
86 asm("FSR0H equ 05h");
87
88
89 typedef union {
90 struct {
91 unsigned FSR0H :8;
92 };
93 } FSR0Hbits_t;
94 extern volatile FSR0Hbits_t FSR0Hbits @ 0x005;
95
96 # 202
97 extern volatile unsigned short FSR1 @ 0x006;
98
99
100 extern volatile unsigned char FSR1L @ 0x006;
101
102 asm("FSR1L equ 06h");
103
104
105 typedef union {
106 struct {
107 unsigned FSR1L :8;
108 };
109 } FSR1Lbits_t;
110 extern volatile FSR1Lbits_t FSR1Lbits @ 0x006;
111
112 # 224
113 extern volatile unsigned char FSR1H @ 0x007;
114
115 asm("FSR1H equ 07h");
116
117
118 typedef union {
119 struct {
120 unsigned FSR1H :8;
121 };
122 } FSR1Hbits_t;
123 extern volatile FSR1Hbits_t FSR1Hbits @ 0x007;
124
125 # 243
126 extern volatile unsigned char BSR @ 0x008;
127
128 asm("BSR equ 08h");
129
130
131 typedef union {
132 struct {
133 unsigned BSR0 :1;
134 unsigned BSR1 :1;
135 unsigned BSR2 :1;
136 unsigned BSR3 :1;
137 unsigned BSR4 :1;
138 };
139 struct {
140 unsigned BSR :5;
141 };
142 } BSRbits_t;
143 extern volatile BSRbits_t BSRbits @ 0x008;
144
145 # 294
146 extern volatile unsigned char WREG @ 0x009;
147
148 asm("WREG equ 09h");
149
150
151 typedef union {
152 struct {
153 unsigned WREG0 :8;
154 };
155 } WREGbits_t;
156 extern volatile WREGbits_t WREGbits @ 0x009;
157
158 # 313
159 extern volatile unsigned char PCLATH @ 0x00A;
160
161 asm("PCLATH equ 0Ah");
162
163
164 typedef union {
165 struct {
166 unsigned PCLATH :7;
167 };
168 } PCLATHbits_t;
169 extern volatile PCLATHbits_t PCLATHbits @ 0x00A;
170
171 # 332
172 extern volatile unsigned char INTCON @ 0x00B;
173
174 asm("INTCON equ 0Bh");
175
176
177 typedef union {
178 struct {
179 unsigned IOCIF :1;
180 unsigned INTF :1;
181 unsigned TMR0IF :1;
182 unsigned IOCIE :1;
183 unsigned INTE :1;
184 unsigned TMR0IE :1;
185 unsigned PEIE :1;
186 unsigned GIE :1;
187 };
188 struct {
189 unsigned :2;
190 unsigned T0IF :1;
191 unsigned :2;
192 unsigned T0IE :1;
193 };
194 } INTCONbits_t;
195 extern volatile INTCONbits_t INTCONbits @ 0x00B;
196
197 # 409
198 extern volatile unsigned char PORTA @ 0x00C;
199
200 asm("PORTA equ 0Ch");
201
202
203 typedef union {
204 struct {
205 unsigned RA0 :1;
206 unsigned RA1 :1;
207 unsigned RA2 :1;
208 unsigned RA3 :1;
209 unsigned RA4 :1;
210 unsigned RA5 :1;
211 };
212 struct {
213 unsigned AN0 :1;
214 unsigned AN1 :1;
215 unsigned AN2 :1;
216 unsigned :1;
217 unsigned AN3 :1;
218 };
219 struct {
220 unsigned CPS0 :1;
221 unsigned CPS1 :1;
222 unsigned CPS2 :1;
223 unsigned :1;
224 unsigned CPS3 :1;
225 };
226 struct {
227 unsigned C1INP :1;
228 unsigned C1IN0N :1;
229 unsigned C1OUT :1;
230 unsigned :1;
231 unsigned C1IN1N :1;
232 };
233 struct {
234 unsigned DACOUT :1;
235 unsigned SRI :1;
236 unsigned SRQ :1;
237 unsigned :2;
238 unsigned SRNQ :1;
239 };
240 struct {
241 unsigned :1;
242 unsigned SCK :1;
243 unsigned T0CKI :1;
244 unsigned :1;
245 unsigned T1OSO :1;
246 unsigned T1CKI :1;
247 };
248 struct {
249 unsigned :1;
250 unsigned SCL :1;
251 unsigned SDA :1;
252 unsigned nMCLR :1;
253 unsigned CLKR :1;
254 unsigned T1OSI :1;
255 };
256 struct {
257 unsigned MDOUT :1;
258 unsigned MDMIN :1;
259 unsigned MDCIN1 :1;
260 unsigned :1;
261 unsigned MDCIN2 :1;
262 };
263 struct {
264 unsigned :2;
265 unsigned SDI :1;
266 unsigned :1;
267 unsigned OSC2 :1;
268 unsigned OSC1 :1;
269 };
270 struct {
271 unsigned :2;
272 unsigned FLT0 :1;
273 unsigned :1;
274 unsigned CLKOUT :1;
275 unsigned CLKIN :1;
276 };
277 } PORTAbits_t;
278 extern volatile PORTAbits_t PORTAbits @ 0x00C;
279
280 # 698
281 extern volatile unsigned char PIR1 @ 0x011;
282
283 asm("PIR1 equ 011h");
284
285
286 typedef union {
287 struct {
288 unsigned TMR1IF :1;
289 unsigned TMR2IF :1;
290 unsigned CCP1IF :1;
291 unsigned SSP1IF :1;
292 unsigned TXIF :1;
293 unsigned RCIF :1;
294 unsigned ADIF :1;
295 unsigned TMR1GIF :1;
296 };
297 } PIR1bits_t;
298 extern volatile PIR1bits_t PIR1bits @ 0x011;
299
300 # 759
301 extern volatile unsigned char PIR2 @ 0x012;
302
303 asm("PIR2 equ 012h");
304
305
306 typedef union {
307 struct {
308 unsigned :3;
309 unsigned BCL1IF :1;
310 unsigned EEIF :1;
311 unsigned C1IF :1;
312 unsigned :1;
313 unsigned OSFIF :1;
314 };
315 } PIR2bits_t;
316 extern volatile PIR2bits_t PIR2bits @ 0x012;
317
318 # 798
319 extern volatile unsigned char TMR0 @ 0x015;
320
321 asm("TMR0 equ 015h");
322
323
324 typedef union {
325 struct {
326 unsigned TMR0 :8;
327 };
328 } TMR0bits_t;
329 extern volatile TMR0bits_t TMR0bits @ 0x015;
330
331 # 817
332 extern volatile unsigned short TMR1 @ 0x016;
333
334 asm("TMR1 equ 016h");
335
336
337
338 extern volatile unsigned char TMR1L @ 0x016;
339
340 asm("TMR1L equ 016h");
341
342
343 typedef union {
344 struct {
345 unsigned TMR1L :8;
346 };
347 } TMR1Lbits_t;
348 extern volatile TMR1Lbits_t TMR1Lbits @ 0x016;
349
350 # 842
351 extern volatile unsigned char TMR1H @ 0x017;
352
353 asm("TMR1H equ 017h");
354
355
356 typedef union {
357 struct {
358 unsigned TMR1H :8;
359 };
360 } TMR1Hbits_t;
361 extern volatile TMR1Hbits_t TMR1Hbits @ 0x017;
362
363 # 861
364 extern volatile unsigned char T1CON @ 0x018;
365
366 asm("T1CON equ 018h");
367
368
369 typedef union {
370 struct {
371 unsigned TMR1ON :1;
372 unsigned :1;
373 unsigned nT1SYNC :1;
374 unsigned T1OSCEN :1;
375 unsigned T1CKPS0 :1;
376 unsigned T1CKPS1 :1;
377 unsigned TMR1CS0 :1;
378 unsigned TMR1CS1 :1;
379 };
380 struct {
381 unsigned :4;
382 unsigned T1CKPS :2;
383 unsigned TMR1CS :2;
384 };
385 } T1CONbits_t;
386 extern volatile T1CONbits_t T1CONbits @ 0x018;
387
388 # 932
389 extern volatile unsigned char T1GCON @ 0x019;
390
391 asm("T1GCON equ 019h");
392
393
394 typedef union {
395 struct {
396 unsigned T1GSS0 :1;
397 unsigned T1GSS1 :1;
398 unsigned T1GVAL :1;
399 unsigned T1GGO_nDONE :1;
400 unsigned T1GSPM :1;
401 unsigned T1GTM :1;
402 unsigned T1GPOL :1;
403 unsigned TMR1GE :1;
404 };
405 struct {
406 unsigned T1GSS :2;
407 unsigned :1;
408 unsigned T1GGO :1;
409 };
410 } T1GCONbits_t;
411 extern volatile T1GCONbits_t T1GCONbits @ 0x019;
412
413 # 1008
414 extern volatile unsigned char TMR2 @ 0x01A;
415
416 asm("TMR2 equ 01Ah");
417
418
419 typedef union {
420 struct {
421 unsigned TMR2 :8;
422 };
423 } TMR2bits_t;
424 extern volatile TMR2bits_t TMR2bits @ 0x01A;
425
426 # 1027
427 extern volatile unsigned char PR2 @ 0x01B;
428
429 asm("PR2 equ 01Bh");
430
431
432 typedef union {
433 struct {
434 unsigned PR2 :8;
435 };
436 } PR2bits_t;
437 extern volatile PR2bits_t PR2bits @ 0x01B;
438
439 # 1046
440 extern volatile unsigned char T2CON @ 0x01C;
441
442 asm("T2CON equ 01Ch");
443
444
445 typedef union {
446 struct {
447 unsigned T2CKPS0 :1;
448 unsigned T2CKPS1 :1;
449 unsigned TMR2ON :1;
450 unsigned T2OUTPS0 :1;
451 unsigned T2OUTPS1 :1;
452 unsigned T2OUTPS2 :1;
453 unsigned T2OUTPS3 :1;
454 };
455 struct {
456 unsigned T2CKPS :2;
457 unsigned :1;
458 unsigned T2OUTPS :4;
459 };
460 } T2CONbits_t;
461 extern volatile T2CONbits_t T2CONbits @ 0x01C;
462
463 # 1116
464 extern volatile unsigned char CPSCON0 @ 0x01E;
465
466 asm("CPSCON0 equ 01Eh");
467
468
469 typedef union {
470 struct {
471 unsigned T0XCS :1;
472 unsigned CPSOUT :1;
473 unsigned CPSRNG0 :1;
474 unsigned CPSRNG1 :1;
475 unsigned :2;
476 unsigned CPSRM :1;
477 unsigned CPSON :1;
478 };
479 struct {
480 unsigned :2;
481 unsigned CPSRNG :2;
482 };
483 } CPSCON0bits_t;
484 extern volatile CPSCON0bits_t CPSCON0bits @ 0x01E;
485
486 # 1175
487 extern volatile unsigned char CPSCON1 @ 0x01F;
488
489 asm("CPSCON1 equ 01Fh");
490
491
492 typedef union {
493 struct {
494 unsigned CPSCH0 :1;
495 unsigned CPSCH1 :1;
496 };
497 struct {
498 unsigned CPSCH :2;
499 };
500 } CPSCON1bits_t;
501 extern volatile CPSCON1bits_t CPSCON1bits @ 0x01F;
502
503 # 1208
504 extern volatile unsigned char TRISA @ 0x08C;
505
506 asm("TRISA equ 08Ch");
507
508
509 typedef union {
510 struct {
511 unsigned TRISA0 :1;
512 unsigned TRISA1 :1;
513 unsigned TRISA2 :1;
514 unsigned TRISA3 :1;
515 unsigned TRISA4 :1;
516 unsigned TRISA5 :1;
517 };
518 } TRISAbits_t;
519 extern volatile TRISAbits_t TRISAbits @ 0x08C;
520
521 # 1257
522 extern volatile unsigned char PIE1 @ 0x091;
523
524 asm("PIE1 equ 091h");
525
526
527 typedef union {
528 struct {
529 unsigned TMR1IE :1;
530 unsigned TMR2IE :1;
531 unsigned CCP1IE :1;
532 unsigned SSP1IE :1;
533 unsigned TXIE :1;
534 unsigned RCIE :1;
535 unsigned ADIE :1;
536 unsigned TMR1GIE :1;
537 };
538 } PIE1bits_t;
539 extern volatile PIE1bits_t PIE1bits @ 0x091;
540
541 # 1318
542 extern volatile unsigned char PIE2 @ 0x092;
543
544 asm("PIE2 equ 092h");
545
546
547 typedef union {
548 struct {
549 unsigned :3;
550 unsigned BCL1IE :1;
551 unsigned EEIE :1;
552 unsigned C1IE :1;
553 unsigned :1;
554 unsigned OSFIE :1;
555 };
556 } PIE2bits_t;
557 extern volatile PIE2bits_t PIE2bits @ 0x092;
558
559 # 1357
560 extern volatile unsigned char OPTION_REG @ 0x095;
561
562 asm("OPTION_REG equ 095h");
563
564
565 typedef union {
566 struct {
567 unsigned PS0 :1;
568 unsigned PS1 :1;
569 unsigned PS2 :1;
570 unsigned PSA :1;
571 unsigned TMR0SE :1;
572 unsigned TMR0CS :1;
573 unsigned INTEDG :1;
574 unsigned nWPUEN :1;
575 };
576 struct {
577 unsigned PS :3;
578 unsigned :1;
579 unsigned T0SE :1;
580 unsigned T0CS :1;
581 };
582 } OPTION_REGbits_t;
583 extern volatile OPTION_REGbits_t OPTION_REGbits @ 0x095;
584
585 # 1439
586 extern volatile unsigned char PCON @ 0x096;
587
588 asm("PCON equ 096h");
589
590
591 typedef union {
592 struct {
593 unsigned nBOR :1;
594 unsigned nPOR :1;
595 unsigned nRI :1;
596 unsigned nRMCLR :1;
597 unsigned :2;
598 unsigned STKUNF :1;
599 unsigned STKOVF :1;
600 };
601 } PCONbits_t;
602 extern volatile PCONbits_t PCONbits @ 0x096;
603
604 # 1489
605 extern volatile unsigned char WDTCON @ 0x097;
606
607 asm("WDTCON equ 097h");
608
609
610 typedef union {
611 struct {
612 unsigned SWDTEN :1;
613 unsigned WDTPS0 :1;
614 unsigned WDTPS1 :1;
615 unsigned WDTPS2 :1;
616 unsigned WDTPS3 :1;
617 unsigned WDTPS4 :1;
618 };
619 struct {
620 unsigned :1;
621 unsigned WDTPS :5;
622 };
623 } WDTCONbits_t;
624 extern volatile WDTCONbits_t WDTCONbits @ 0x097;
625
626 # 1547
627 extern volatile unsigned char OSCTUNE @ 0x098;
628
629 asm("OSCTUNE equ 098h");
630
631
632 typedef union {
633 struct {
634 unsigned TUN0 :1;
635 unsigned TUN1 :1;
636 unsigned TUN2 :1;
637 unsigned TUN3 :1;
638 unsigned TUN4 :1;
639 unsigned TUN5 :1;
640 };
641 struct {
642 unsigned TUN :6;
643 };
644 } OSCTUNEbits_t;
645 extern volatile OSCTUNEbits_t OSCTUNEbits @ 0x098;
646
647 # 1604
648 extern volatile unsigned char OSCCON @ 0x099;
649
650 asm("OSCCON equ 099h");
651
652
653 typedef union {
654 struct {
655 unsigned SCS0 :1;
656 unsigned SCS1 :1;
657 unsigned :1;
658 unsigned IRCF0 :1;
659 unsigned IRCF1 :1;
660 unsigned IRCF2 :1;
661 unsigned IRCF3 :1;
662 unsigned SPLLEN :1;
663 };
664 struct {
665 unsigned SCS :2;
666 unsigned :1;
667 unsigned IRCF :4;
668 };
669 } OSCCONbits_t;
670 extern volatile OSCCONbits_t OSCCONbits @ 0x099;
671
672 # 1675
673 extern volatile unsigned char OSCSTAT @ 0x09A;
674
675 asm("OSCSTAT equ 09Ah");
676
677
678 typedef union {
679 struct {
680 unsigned HFIOFS :1;
681 unsigned LFIOFR :1;
682 unsigned MFIOFR :1;
683 unsigned HFIOFL :1;
684 unsigned HFIOFR :1;
685 unsigned OSTS :1;
686 unsigned PLLR :1;
687 unsigned T1OSCR :1;
688 };
689 } OSCSTATbits_t;
690 extern volatile OSCSTATbits_t OSCSTATbits @ 0x09A;
691
692 # 1736
693 extern volatile unsigned short ADRES @ 0x09B;
694
695 asm("ADRES equ 09Bh");
696
697
698
699 extern volatile unsigned char ADRESL @ 0x09B;
700
701 asm("ADRESL equ 09Bh");
702
703
704 typedef union {
705 struct {
706 unsigned ADRESL :8;
707 };
708 } ADRESLbits_t;
709 extern volatile ADRESLbits_t ADRESLbits @ 0x09B;
710
711 # 1761
712 extern volatile unsigned char ADRESH @ 0x09C;
713
714 asm("ADRESH equ 09Ch");
715
716
717 typedef union {
718 struct {
719 unsigned ADRESH :8;
720 };
721 } ADRESHbits_t;
722 extern volatile ADRESHbits_t ADRESHbits @ 0x09C;
723
724 # 1780
725 extern volatile unsigned char ADCON0 @ 0x09D;
726
727 asm("ADCON0 equ 09Dh");
728
729
730 typedef union {
731 struct {
732 unsigned ADON :1;
733 unsigned GO_nDONE :1;
734 unsigned CHS0 :1;
735 unsigned CHS1 :1;
736 unsigned CHS2 :1;
737 unsigned CHS3 :1;
738 unsigned CHS4 :1;
739 };
740 struct {
741 unsigned :1;
742 unsigned ADGO :1;
743 unsigned CHS :5;
744 };
745 struct {
746 unsigned :1;
747 unsigned GO :1;
748 };
749 struct {
750 unsigned :1;
751 unsigned nDONE :1;
752 };
753 } ADCON0bits_t;
754 extern volatile ADCON0bits_t ADCON0bits @ 0x09D;
755
756 # 1868
757 extern volatile unsigned char ADCON1 @ 0x09E;
758
759 asm("ADCON1 equ 09Eh");
760
761
762 typedef union {
763 struct {
764 unsigned ADPREF0 :1;
765 unsigned ADPREF1 :1;
766 unsigned :2;
767 unsigned ADCS0 :1;
768 unsigned ADCS1 :1;
769 unsigned ADCS2 :1;
770 unsigned ADFM :1;
771 };
772 struct {
773 unsigned ADPREF :2;
774 unsigned :2;
775 unsigned ADCS :3;
776 };
777 } ADCON1bits_t;
778 extern volatile ADCON1bits_t ADCON1bits @ 0x09E;
779
780 # 1933
781 extern volatile unsigned char LATA @ 0x10C;
782
783 asm("LATA equ 010Ch");
784
785
786 typedef union {
787 struct {
788 unsigned LATA0 :1;
789 unsigned LATA1 :1;
790 unsigned LATA2 :1;
791 unsigned :1;
792 unsigned LATA4 :1;
793 unsigned LATA5 :1;
794 };
795 } LATAbits_t;
796 extern volatile LATAbits_t LATAbits @ 0x10C;
797
798 # 1977
799 extern volatile unsigned char CM1CON0 @ 0x111;
800
801 asm("CM1CON0 equ 0111h");
802
803
804 typedef union {
805 struct {
806 unsigned C1SYNC :1;
807 unsigned C1HYS :1;
808 unsigned C1SP :1;
809 unsigned :1;
810 unsigned C1POL :1;
811 unsigned C1OE :1;
812 unsigned C1OUT :1;
813 unsigned C1ON :1;
814 };
815 } CM1CON0bits_t;
816 extern volatile CM1CON0bits_t CM1CON0bits @ 0x111;
817
818 # 2033
819 extern volatile unsigned char CM1CON1 @ 0x112;
820
821 asm("CM1CON1 equ 0112h");
822
823
824 typedef union {
825 struct {
826 unsigned C1NCH0 :1;
827 unsigned :3;
828 unsigned C1PCH0 :1;
829 unsigned C1PCH1 :1;
830 unsigned C1INTN :1;
831 unsigned C1INTP :1;
832 };
833 struct {
834 unsigned :4;
835 unsigned C1PCH :2;
836 };
837 } CM1CON1bits_t;
838 extern volatile CM1CON1bits_t CM1CON1bits @ 0x112;
839
840 # 2086
841 extern volatile unsigned char CMOUT @ 0x115;
842
843 asm("CMOUT equ 0115h");
844
845
846 typedef union {
847 struct {
848 unsigned MC1OUT :1;
849 };
850 } CMOUTbits_t;
851 extern volatile CMOUTbits_t CMOUTbits @ 0x115;
852
853 # 2105
854 extern volatile unsigned char BORCON @ 0x116;
855
856 asm("BORCON equ 0116h");
857
858
859 typedef union {
860 struct {
861 unsigned BORRDY :1;
862 unsigned :6;
863 unsigned SBOREN :1;
864 };
865 } BORCONbits_t;
866 extern volatile BORCONbits_t BORCONbits @ 0x116;
867
868 # 2131
869 extern volatile unsigned char FVRCON @ 0x117;
870
871 asm("FVRCON equ 0117h");
872
873
874 typedef union {
875 struct {
876 unsigned ADFVR0 :1;
877 unsigned ADFVR1 :1;
878 unsigned CDAFVR0 :1;
879 unsigned CDAFVR1 :1;
880 unsigned TSRNG :1;
881 unsigned TSEN :1;
882 unsigned FVRRDY :1;
883 unsigned FVREN :1;
884 };
885 struct {
886 unsigned ADFVR :2;
887 unsigned CDAFVR :2;
888 };
889 } FVRCONbits_t;
890 extern volatile FVRCONbits_t FVRCONbits @ 0x117;
891
892 # 2206
893 extern volatile unsigned char DACCON0 @ 0x118;
894
895 asm("DACCON0 equ 0118h");
896
897
898 typedef union {
899 struct {
900 unsigned :2;
901 unsigned DACPSS0 :1;
902 unsigned DACPSS1 :1;
903 unsigned :1;
904 unsigned DACOE :1;
905 unsigned DACLPS :1;
906 unsigned DACEN :1;
907 };
908 struct {
909 unsigned :2;
910 unsigned DACPSS :2;
911 };
912 } DACCON0bits_t;
913 extern volatile DACCON0bits_t DACCON0bits @ 0x118;
914
915 # 2260
916 extern volatile unsigned char DACCON1 @ 0x119;
917
918 asm("DACCON1 equ 0119h");
919
920
921 typedef union {
922 struct {
923 unsigned DACR0 :1;
924 unsigned DACR1 :1;
925 unsigned DACR2 :1;
926 unsigned DACR3 :1;
927 unsigned DACR4 :1;
928 };
929 struct {
930 unsigned DACR :5;
931 };
932 } DACCON1bits_t;
933 extern volatile DACCON1bits_t DACCON1bits @ 0x119;
934
935 # 2311
936 extern volatile unsigned char SRCON0 @ 0x11A;
937
938 asm("SRCON0 equ 011Ah");
939
940
941 typedef union {
942 struct {
943 unsigned SRPR :1;
944 unsigned SRPS :1;
945 unsigned SRNQEN :1;
946 unsigned SRQEN :1;
947 unsigned SRCLK0 :1;
948 unsigned SRCLK1 :1;
949 unsigned SRCLK2 :1;
950 unsigned SRLEN :1;
951 };
952 struct {
953 unsigned :4;
954 unsigned SRCLK :3;
955 };
956 } SRCON0bits_t;
957 extern volatile SRCON0bits_t SRCON0bits @ 0x11A;
958
959 # 2381
960 extern volatile unsigned char SRCON1 @ 0x11B;
961
962 asm("SRCON1 equ 011Bh");
963
964
965 typedef union {
966 struct {
967 unsigned SRRC1E :1;
968 unsigned :1;
969 unsigned SRRCKE :1;
970 unsigned SRRPE :1;
971 unsigned SRSC1E :1;
972 unsigned :1;
973 unsigned SRSCKE :1;
974 unsigned SRSPE :1;
975 };
976 } SRCON1bits_t;
977 extern volatile SRCON1bits_t SRCON1bits @ 0x11B;
978
979 # 2432
980 extern volatile unsigned char APFCON @ 0x11D;
981
982 asm("APFCON equ 011Dh");
983
984
985 extern volatile unsigned char APFCON0 @ 0x11D;
986
987 asm("APFCON0 equ 011Dh");
988
989
990 typedef union {
991 struct {
992 unsigned CCP1SEL :1;
993 unsigned P1BSEL :1;
994 unsigned TXCKSEL :1;
995 unsigned T1GSEL :1;
996 unsigned :1;
997 unsigned SSSEL :1;
998 unsigned SDOSEL :1;
999 unsigned RXDTSEL :1;
1000 };
1001 struct {
1002 unsigned :5;
1003 unsigned SS1SEL :1;
1004 unsigned SDO1SEL :1;
1005 };
1006 } APFCONbits_t;
1007 extern volatile APFCONbits_t APFCONbits @ 0x11D;
1008
1009 # 2507
1010 typedef union {
1011 struct {
1012 unsigned CCP1SEL :1;
1013 unsigned P1BSEL :1;
1014 unsigned TXCKSEL :1;
1015 unsigned T1GSEL :1;
1016 unsigned :1;
1017 unsigned SSSEL :1;
1018 unsigned SDOSEL :1;
1019 unsigned RXDTSEL :1;
1020 };
1021 struct {
1022 unsigned :5;
1023 unsigned SS1SEL :1;
1024 unsigned SDO1SEL :1;
1025 };
1026 } APFCON0bits_t;
1027 extern volatile APFCON0bits_t APFCON0bits @ 0x11D;
1028
1029 # 2573
1030 extern volatile unsigned char ANSELA @ 0x18C;
1031
1032 asm("ANSELA equ 018Ch");
1033
1034
1035 typedef union {
1036 struct {
1037 unsigned ANSA0 :1;
1038 unsigned ANSA1 :1;
1039 unsigned ANSA2 :1;
1040 unsigned :1;
1041 unsigned ANSA4 :1;
1042 };
1043 struct {
1044 unsigned ANSELA :5;
1045 };
1046 } ANSELAbits_t;
1047 extern volatile ANSELAbits_t ANSELAbits @ 0x18C;
1048
1049 # 2619
1050 extern volatile unsigned short EEADR @ 0x191;
1051
1052 asm("EEADR equ 0191h");
1053
1054
1055
1056 extern volatile unsigned char EEADRL @ 0x191;
1057
1058 asm("EEADRL equ 0191h");
1059
1060
1061 typedef union {
1062 struct {
1063 unsigned EEADRL :8;
1064 };
1065 } EEADRLbits_t;
1066 extern volatile EEADRLbits_t EEADRLbits @ 0x191;
1067
1068 # 2644
1069 extern volatile unsigned char EEADRH @ 0x192;
1070
1071 asm("EEADRH equ 0192h");
1072
1073
1074 typedef union {
1075 struct {
1076 unsigned EEADRH :7;
1077 };
1078 } EEADRHbits_t;
1079 extern volatile EEADRHbits_t EEADRHbits @ 0x192;
1080
1081 # 2663
1082 extern volatile unsigned short EEDAT @ 0x193;
1083
1084 asm("EEDAT equ 0193h");
1085
1086
1087
1088 extern volatile unsigned char EEDATL @ 0x193;
1089
1090 asm("EEDATL equ 0193h");
1091
1092
1093 extern volatile unsigned char EEDATA @ 0x193;
1094
1095 asm("EEDATA equ 0193h");
1096
1097
1098 typedef union {
1099 struct {
1100 unsigned EEDATL :8;
1101 };
1102 } EEDATLbits_t;
1103 extern volatile EEDATLbits_t EEDATLbits @ 0x193;
1104
1105 # 2692
1106 typedef union {
1107 struct {
1108 unsigned EEDATL :8;
1109 };
1110 } EEDATAbits_t;
1111 extern volatile EEDATAbits_t EEDATAbits @ 0x193;
1112
1113 # 2706
1114 extern volatile unsigned char EEDATH @ 0x194;
1115
1116 asm("EEDATH equ 0194h");
1117
1118
1119 typedef union {
1120 struct {
1121 unsigned EEDATH :6;
1122 };
1123 } EEDATHbits_t;
1124 extern volatile EEDATHbits_t EEDATHbits @ 0x194;
1125
1126 # 2725
1127 extern volatile unsigned char EECON1 @ 0x195;
1128
1129 asm("EECON1 equ 0195h");
1130
1131
1132 typedef union {
1133 struct {
1134 unsigned RD :1;
1135 unsigned WR :1;
1136 unsigned WREN :1;
1137 unsigned WRERR :1;
1138 unsigned FREE :1;
1139 unsigned LWLO :1;
1140 unsigned CFGS :1;
1141 unsigned EEPGD :1;
1142 };
1143 } EECON1bits_t;
1144 extern volatile EECON1bits_t EECON1bits @ 0x195;
1145
1146 # 2786
1147 extern volatile unsigned char EECON2 @ 0x196;
1148
1149 asm("EECON2 equ 0196h");
1150
1151
1152 typedef union {
1153 struct {
1154 unsigned EECON2 :8;
1155 };
1156 } EECON2bits_t;
1157 extern volatile EECON2bits_t EECON2bits @ 0x196;
1158
1159 # 2805
1160 extern volatile unsigned char RCREG @ 0x199;
1161
1162 asm("RCREG equ 0199h");
1163
1164
1165 typedef union {
1166 struct {
1167 unsigned RCREG :8;
1168 };
1169 } RCREGbits_t;
1170 extern volatile RCREGbits_t RCREGbits @ 0x199;
1171
1172 # 2824
1173 extern volatile unsigned char TXREG @ 0x19A;
1174
1175 asm("TXREG equ 019Ah");
1176
1177
1178 typedef union {
1179 struct {
1180 unsigned TXREG :8;
1181 };
1182 } TXREGbits_t;
1183 extern volatile TXREGbits_t TXREGbits @ 0x19A;
1184
1185 # 2843
1186 extern volatile unsigned char SPBRGL @ 0x19B;
1187
1188 asm("SPBRGL equ 019Bh");
1189
1190
1191 extern volatile unsigned char SPBRG @ 0x19B;
1192
1193 asm("SPBRG equ 019Bh");
1194
1195
1196 typedef union {
1197 struct {
1198 unsigned SPBRGL :8;
1199 };
1200 } SPBRGLbits_t;
1201 extern volatile SPBRGLbits_t SPBRGLbits @ 0x19B;
1202
1203 # 2866
1204 typedef union {
1205 struct {
1206 unsigned SPBRGL :8;
1207 };
1208 } SPBRGbits_t;
1209 extern volatile SPBRGbits_t SPBRGbits @ 0x19B;
1210
1211 # 2880
1212 extern volatile unsigned char SPBRGH @ 0x19C;
1213
1214 asm("SPBRGH equ 019Ch");
1215
1216
1217 typedef union {
1218 struct {
1219 unsigned SPBRGH :8;
1220 };
1221 } SPBRGHbits_t;
1222 extern volatile SPBRGHbits_t SPBRGHbits @ 0x19C;
1223
1224 # 2899
1225 extern volatile unsigned char RCSTA @ 0x19D;
1226
1227 asm("RCSTA equ 019Dh");
1228
1229
1230 typedef union {
1231 struct {
1232 unsigned RX9D :1;
1233 unsigned OERR :1;
1234 unsigned FERR :1;
1235 unsigned ADDEN :1;
1236 unsigned CREN :1;
1237 unsigned SREN :1;
1238 unsigned RX9 :1;
1239 unsigned SPEN :1;
1240 };
1241 } RCSTAbits_t;
1242 extern volatile RCSTAbits_t RCSTAbits @ 0x19D;
1243
1244 # 2960
1245 extern volatile unsigned char TXSTA @ 0x19E;
1246
1247 asm("TXSTA equ 019Eh");
1248
1249
1250 typedef union {
1251 struct {
1252 unsigned TX9D :1;
1253 unsigned TRMT :1;
1254 unsigned BRGH :1;
1255 unsigned SENDB :1;
1256 unsigned SYNC :1;
1257 unsigned TXEN :1;
1258 unsigned TX9 :1;
1259 unsigned CSRC :1;
1260 };
1261 } TXSTAbits_t;
1262 extern volatile TXSTAbits_t TXSTAbits @ 0x19E;
1263
1264 # 3021
1265 extern volatile unsigned char BAUDCON @ 0x19F;
1266
1267 asm("BAUDCON equ 019Fh");
1268
1269
1270 typedef union {
1271 struct {
1272 unsigned ABDEN :1;
1273 unsigned WUE :1;
1274 unsigned :1;
1275 unsigned BRG16 :1;
1276 unsigned SCKP :1;
1277 unsigned :1;
1278 unsigned RCIDL :1;
1279 unsigned ABDOVF :1;
1280 };
1281 } BAUDCONbits_t;
1282 extern volatile BAUDCONbits_t BAUDCONbits @ 0x19F;
1283
1284 # 3072
1285 extern volatile unsigned char WPUA @ 0x20C;
1286
1287 asm("WPUA equ 020Ch");
1288
1289
1290 typedef union {
1291 struct {
1292 unsigned WPUA0 :1;
1293 unsigned WPUA1 :1;
1294 unsigned WPUA2 :1;
1295 unsigned WPUA3 :1;
1296 unsigned WPUA4 :1;
1297 unsigned WPUA5 :1;
1298 };
1299 struct {
1300 unsigned WPUA :6;
1301 };
1302 } WPUAbits_t;
1303 extern volatile WPUAbits_t WPUAbits @ 0x20C;
1304
1305 # 3129
1306 extern volatile unsigned char SSP1BUF @ 0x211;
1307
1308 asm("SSP1BUF equ 0211h");
1309
1310
1311 extern volatile unsigned char SSPBUF @ 0x211;
1312
1313 asm("SSPBUF equ 0211h");
1314
1315
1316 typedef union {
1317 struct {
1318 unsigned SSPBUF :8;
1319 };
1320 } SSP1BUFbits_t;
1321 extern volatile SSP1BUFbits_t SSP1BUFbits @ 0x211;
1322
1323 # 3152
1324 typedef union {
1325 struct {
1326 unsigned SSPBUF :8;
1327 };
1328 } SSPBUFbits_t;
1329 extern volatile SSPBUFbits_t SSPBUFbits @ 0x211;
1330
1331 # 3166
1332 extern volatile unsigned char SSP1ADD @ 0x212;
1333
1334 asm("SSP1ADD equ 0212h");
1335
1336
1337 extern volatile unsigned char SSPADD @ 0x212;
1338
1339 asm("SSPADD equ 0212h");
1340
1341
1342 typedef union {
1343 struct {
1344 unsigned SSPADD :8;
1345 };
1346 } SSP1ADDbits_t;
1347 extern volatile SSP1ADDbits_t SSP1ADDbits @ 0x212;
1348
1349 # 3189
1350 typedef union {
1351 struct {
1352 unsigned SSPADD :8;
1353 };
1354 } SSPADDbits_t;
1355 extern volatile SSPADDbits_t SSPADDbits @ 0x212;
1356
1357 # 3203
1358 extern volatile unsigned char SSP1MSK @ 0x213;
1359
1360 asm("SSP1MSK equ 0213h");
1361
1362
1363 extern volatile unsigned char SSPMSK @ 0x213;
1364
1365 asm("SSPMSK equ 0213h");
1366
1367
1368 typedef union {
1369 struct {
1370 unsigned SSPMSK :8;
1371 };
1372 } SSP1MSKbits_t;
1373 extern volatile SSP1MSKbits_t SSP1MSKbits @ 0x213;
1374
1375 # 3226
1376 typedef union {
1377 struct {
1378 unsigned SSPMSK :8;
1379 };
1380 } SSPMSKbits_t;
1381 extern volatile SSPMSKbits_t SSPMSKbits @ 0x213;
1382
1383 # 3240
1384 extern volatile unsigned char SSP1STAT @ 0x214;
1385
1386 asm("SSP1STAT equ 0214h");
1387
1388
1389 extern volatile unsigned char SSPSTAT @ 0x214;
1390
1391 asm("SSPSTAT equ 0214h");
1392
1393
1394 typedef union {
1395 struct {
1396 unsigned BF :1;
1397 unsigned UA :1;
1398 unsigned R_nW :1;
1399 unsigned S :1;
1400 unsigned P :1;
1401 unsigned D_nA :1;
1402 unsigned CKE :1;
1403 unsigned SMP :1;
1404 };
1405 } SSP1STATbits_t;
1406 extern volatile SSP1STATbits_t SSP1STATbits @ 0x214;
1407
1408 # 3305
1409 typedef union {
1410 struct {
1411 unsigned BF :1;
1412 unsigned UA :1;
1413 unsigned R_nW :1;
1414 unsigned S :1;
1415 unsigned P :1;
1416 unsigned D_nA :1;
1417 unsigned CKE :1;
1418 unsigned SMP :1;
1419 };
1420 } SSPSTATbits_t;
1421 extern volatile SSPSTATbits_t SSPSTATbits @ 0x214;
1422
1423 # 3361
1424 extern volatile unsigned char SSP1CON1 @ 0x215;
1425
1426 asm("SSP1CON1 equ 0215h");
1427
1428
1429 extern volatile unsigned char SSPCON1 @ 0x215;
1430
1431 asm("SSPCON1 equ 0215h");
1432
1433 extern volatile unsigned char SSPCON @ 0x215;
1434
1435 asm("SSPCON equ 0215h");
1436
1437
1438 typedef union {
1439 struct {
1440 unsigned SSPM0 :1;
1441 unsigned SSPM1 :1;
1442 unsigned SSPM2 :1;
1443 unsigned SSPM3 :1;
1444 unsigned CKP :1;
1445 unsigned SSPEN :1;
1446 unsigned SSPOV :1;
1447 unsigned WCOL :1;
1448 };
1449 struct {
1450 unsigned SSPM :4;
1451 };
1452 } SSP1CON1bits_t;
1453 extern volatile SSP1CON1bits_t SSP1CON1bits @ 0x215;
1454
1455 # 3438
1456 typedef union {
1457 struct {
1458 unsigned SSPM0 :1;
1459 unsigned SSPM1 :1;
1460 unsigned SSPM2 :1;
1461 unsigned SSPM3 :1;
1462 unsigned CKP :1;
1463 unsigned SSPEN :1;
1464 unsigned SSPOV :1;
1465 unsigned WCOL :1;
1466 };
1467 struct {
1468 unsigned SSPM :4;
1469 };
1470 } SSPCON1bits_t;
1471 extern volatile SSPCON1bits_t SSPCON1bits @ 0x215;
1472
1473 # 3500
1474 typedef union {
1475 struct {
1476 unsigned SSPM0 :1;
1477 unsigned SSPM1 :1;
1478 unsigned SSPM2 :1;
1479 unsigned SSPM3 :1;
1480 unsigned CKP :1;
1481 unsigned SSPEN :1;
1482 unsigned SSPOV :1;
1483 unsigned WCOL :1;
1484 };
1485 struct {
1486 unsigned SSPM :4;
1487 };
1488 } SSPCONbits_t;
1489 extern volatile SSPCONbits_t SSPCONbits @ 0x215;
1490
1491 # 3564
1492 extern volatile unsigned char SSP1CON2 @ 0x216;
1493
1494 asm("SSP1CON2 equ 0216h");
1495
1496
1497 extern volatile unsigned char SSPCON2 @ 0x216;
1498
1499 asm("SSPCON2 equ 0216h");
1500
1501
1502 typedef union {
1503 struct {
1504 unsigned SEN :1;
1505 unsigned RSEN :1;
1506 unsigned PEN :1;
1507 unsigned RCEN :1;
1508 unsigned ACKEN :1;
1509 unsigned ACKDT :1;
1510 unsigned ACKSTAT :1;
1511 unsigned GCEN :1;
1512 };
1513 } SSP1CON2bits_t;
1514 extern volatile SSP1CON2bits_t SSP1CON2bits @ 0x216;
1515
1516 # 3629
1517 typedef union {
1518 struct {
1519 unsigned SEN :1;
1520 unsigned RSEN :1;
1521 unsigned PEN :1;
1522 unsigned RCEN :1;
1523 unsigned ACKEN :1;
1524 unsigned ACKDT :1;
1525 unsigned ACKSTAT :1;
1526 unsigned GCEN :1;
1527 };
1528 } SSPCON2bits_t;
1529 extern volatile SSPCON2bits_t SSPCON2bits @ 0x216;
1530
1531 # 3685
1532 extern volatile unsigned char SSP1CON3 @ 0x217;
1533
1534 asm("SSP1CON3 equ 0217h");
1535
1536
1537 extern volatile unsigned char SSPCON3 @ 0x217;
1538
1539 asm("SSPCON3 equ 0217h");
1540
1541
1542 typedef union {
1543 struct {
1544 unsigned DHEN :1;
1545 unsigned AHEN :1;
1546 unsigned SBCDE :1;
1547 unsigned SDAHT :1;
1548 unsigned BOEN :1;
1549 unsigned SCIE :1;
1550 unsigned PCIE :1;
1551 unsigned ACKTIM :1;
1552 };
1553 } SSP1CON3bits_t;
1554 extern volatile SSP1CON3bits_t SSP1CON3bits @ 0x217;
1555
1556 # 3750
1557 typedef union {
1558 struct {
1559 unsigned DHEN :1;
1560 unsigned AHEN :1;
1561 unsigned SBCDE :1;
1562 unsigned SDAHT :1;
1563 unsigned BOEN :1;
1564 unsigned SCIE :1;
1565 unsigned PCIE :1;
1566 unsigned ACKTIM :1;
1567 };
1568 } SSPCON3bits_t;
1569 extern volatile SSPCON3bits_t SSPCON3bits @ 0x217;
1570
1571 # 3806
1572 extern volatile unsigned char CCPR1L @ 0x291;
1573
1574 asm("CCPR1L equ 0291h");
1575
1576
1577 typedef union {
1578 struct {
1579 unsigned CCPR1L :8;
1580 };
1581 } CCPR1Lbits_t;
1582 extern volatile CCPR1Lbits_t CCPR1Lbits @ 0x291;
1583
1584 # 3825
1585 extern volatile unsigned char CCPR1H @ 0x292;
1586
1587 asm("CCPR1H equ 0292h");
1588
1589
1590 typedef union {
1591 struct {
1592 unsigned CCPR1H :8;
1593 };
1594 } CCPR1Hbits_t;
1595 extern volatile CCPR1Hbits_t CCPR1Hbits @ 0x292;
1596
1597 # 3844
1598 extern volatile unsigned char CCP1CON @ 0x293;
1599
1600 asm("CCP1CON equ 0293h");
1601
1602
1603 typedef union {
1604 struct {
1605 unsigned CCP1M0 :1;
1606 unsigned CCP1M1 :1;
1607 unsigned CCP1M2 :1;
1608 unsigned CCP1M3 :1;
1609 unsigned DC1B0 :1;
1610 unsigned DC1B1 :1;
1611 unsigned P1M0 :1;
1612 unsigned P1M1 :1;
1613 };
1614 struct {
1615 unsigned CCP1M :4;
1616 unsigned DC1B :2;
1617 unsigned P1M :2;
1618 };
1619 } CCP1CONbits_t;
1620 extern volatile CCP1CONbits_t CCP1CONbits @ 0x293;
1621
1622 # 3925
1623 extern volatile unsigned char PWM1CON @ 0x294;
1624
1625 asm("PWM1CON equ 0294h");
1626
1627
1628 typedef union {
1629 struct {
1630 unsigned P1DC0 :1;
1631 unsigned P1DC1 :1;
1632 unsigned P1DC2 :1;
1633 unsigned P1DC3 :1;
1634 unsigned P1DC4 :1;
1635 unsigned P1DC5 :1;
1636 unsigned P1DC6 :1;
1637 unsigned P1RSEN :1;
1638 };
1639 struct {
1640 unsigned P1DC :7;
1641 };
1642 } PWM1CONbits_t;
1643 extern volatile PWM1CONbits_t PWM1CONbits @ 0x294;
1644
1645 # 3994
1646 extern volatile unsigned char CCP1AS @ 0x295;
1647
1648 asm("CCP1AS equ 0295h");
1649
1650
1651 extern volatile unsigned char ECCP1AS @ 0x295;
1652
1653 asm("ECCP1AS equ 0295h");
1654
1655
1656 typedef union {
1657 struct {
1658 unsigned PSS1BD0 :1;
1659 unsigned PSS1BD1 :1;
1660 unsigned PSS1AC0 :1;
1661 unsigned PSS1AC1 :1;
1662 unsigned CCP1AS0 :1;
1663 unsigned CCP1AS1 :1;
1664 unsigned CCP1AS2 :1;
1665 unsigned CCP1ASE :1;
1666 };
1667 struct {
1668 unsigned PSS1BD :2;
1669 unsigned PSS1AC :2;
1670 unsigned CCP1AS :3;
1671 };
1672 } CCP1ASbits_t;
1673 extern volatile CCP1ASbits_t CCP1ASbits @ 0x295;
1674
1675 # 4079
1676 typedef union {
1677 struct {
1678 unsigned PSS1BD0 :1;
1679 unsigned PSS1BD1 :1;
1680 unsigned PSS1AC0 :1;
1681 unsigned PSS1AC1 :1;
1682 unsigned CCP1AS0 :1;
1683 unsigned CCP1AS1 :1;
1684 unsigned CCP1AS2 :1;
1685 unsigned CCP1ASE :1;
1686 };
1687 struct {
1688 unsigned PSS1BD :2;
1689 unsigned PSS1AC :2;
1690 unsigned CCP1AS :3;
1691 };
1692 } ECCP1ASbits_t;
1693 extern volatile ECCP1ASbits_t ECCP1ASbits @ 0x295;
1694
1695 # 4155
1696 extern volatile unsigned char PSTR1CON @ 0x296;
1697
1698 asm("PSTR1CON equ 0296h");
1699
1700
1701 typedef union {
1702 struct {
1703 unsigned STR1A :1;
1704 unsigned STR1B :1;
1705 unsigned STR1C :1;
1706 unsigned STR1D :1;
1707 unsigned STR1SYNC :1;
1708 };
1709 } PSTR1CONbits_t;
1710 extern volatile PSTR1CONbits_t PSTR1CONbits @ 0x296;
1711
1712 # 4198
1713 extern volatile unsigned char IOCAP @ 0x391;
1714
1715 asm("IOCAP equ 0391h");
1716
1717
1718 typedef union {
1719 struct {
1720 unsigned IOCAP0 :1;
1721 unsigned IOCAP1 :1;
1722 unsigned IOCAP2 :1;
1723 unsigned IOCAP3 :1;
1724 unsigned IOCAP4 :1;
1725 unsigned IOCAP5 :1;
1726 };
1727 struct {
1728 unsigned IOCAP :6;
1729 };
1730 } IOCAPbits_t;
1731 extern volatile IOCAPbits_t IOCAPbits @ 0x391;
1732
1733 # 4255
1734 extern volatile unsigned char IOCAN @ 0x392;
1735
1736 asm("IOCAN equ 0392h");
1737
1738
1739 typedef union {
1740 struct {
1741 unsigned IOCAN0 :1;
1742 unsigned IOCAN1 :1;
1743 unsigned IOCAN2 :1;
1744 unsigned IOCAN3 :1;
1745 unsigned IOCAN4 :1;
1746 unsigned IOCAN5 :1;
1747 };
1748 struct {
1749 unsigned IOCAN :6;
1750 };
1751 } IOCANbits_t;
1752 extern volatile IOCANbits_t IOCANbits @ 0x392;
1753
1754 # 4312
1755 extern volatile unsigned char IOCAF @ 0x393;
1756
1757 asm("IOCAF equ 0393h");
1758
1759
1760 typedef union {
1761 struct {
1762 unsigned IOCAF0 :1;
1763 unsigned IOCAF1 :1;
1764 unsigned IOCAF2 :1;
1765 unsigned IOCAF3 :1;
1766 unsigned IOCAF4 :1;
1767 unsigned IOCAF5 :1;
1768 };
1769 struct {
1770 unsigned IOCAF :6;
1771 };
1772 } IOCAFbits_t;
1773 extern volatile IOCAFbits_t IOCAFbits @ 0x393;
1774
1775 # 4369
1776 extern volatile unsigned char CLKRCON @ 0x39A;
1777
1778 asm("CLKRCON equ 039Ah");
1779
1780
1781 typedef union {
1782 struct {
1783 unsigned CLKRDIV0 :1;
1784 unsigned CLKRDIV1 :1;
1785 unsigned CLKRDIV2 :1;
1786 unsigned CLKRDC0 :1;
1787 unsigned CLKRDC1 :1;
1788 unsigned CLKRSLR :1;
1789 unsigned CLKROE :1;
1790 unsigned CLKREN :1;
1791 };
1792 struct {
1793 unsigned CLKRDIV :3;
1794 unsigned CLKRDC :2;
1795 };
1796 } CLKRCONbits_t;
1797 extern volatile CLKRCONbits_t CLKRCONbits @ 0x39A;
1798
1799 # 4444
1800 extern volatile unsigned char MDCON @ 0x39C;
1801
1802 asm("MDCON equ 039Ch");
1803
1804
1805 typedef union {
1806 struct {
1807 unsigned MDBIT :1;
1808 unsigned :2;
1809 unsigned MDOUT :1;
1810 unsigned MDOPOL :1;
1811 unsigned MDSLR :1;
1812 unsigned MDOE :1;
1813 unsigned MDEN :1;
1814 };
1815 } MDCONbits_t;
1816 extern volatile MDCONbits_t MDCONbits @ 0x39C;
1817
1818 # 4494
1819 extern volatile unsigned char MDSRC @ 0x39D;
1820
1821 asm("MDSRC equ 039Dh");
1822
1823
1824 typedef union {
1825 struct {
1826 unsigned MDMS0 :1;
1827 unsigned MDMS1 :1;
1828 unsigned MDMS2 :1;
1829 unsigned MDMS3 :1;
1830 unsigned :3;
1831 unsigned MDMSODIS :1;
1832 };
1833 struct {
1834 unsigned MDMS :4;
1835 };
1836 } MDSRCbits_t;
1837 extern volatile MDSRCbits_t MDSRCbits @ 0x39D;
1838
1839 # 4546
1840 extern volatile unsigned char MDCARL @ 0x39E;
1841
1842 asm("MDCARL equ 039Eh");
1843
1844
1845 typedef union {
1846 struct {
1847 unsigned MDCL0 :1;
1848 unsigned MDCL1 :1;
1849 unsigned MDCL2 :1;
1850 unsigned MDCL3 :1;
1851 unsigned :1;
1852 unsigned MDCLSYNC :1;
1853 unsigned MDCLPOL :1;
1854 unsigned MDCLODIS :1;
1855 };
1856 struct {
1857 unsigned MDCL :4;
1858 };
1859 } MDCARLbits_t;
1860 extern volatile MDCARLbits_t MDCARLbits @ 0x39E;
1861
1862 # 4610
1863 extern volatile unsigned char MDCARH @ 0x39F;
1864
1865 asm("MDCARH equ 039Fh");
1866
1867
1868 typedef union {
1869 struct {
1870 unsigned MDCH0 :1;
1871 unsigned MDCH1 :1;
1872 unsigned MDCH2 :1;
1873 unsigned MDCH3 :1;
1874 unsigned :1;
1875 unsigned MDCHSYNC :1;
1876 unsigned MDCHPOL :1;
1877 unsigned MDCHODIS :1;
1878 };
1879 struct {
1880 unsigned MDCH :4;
1881 };
1882 } MDCARHbits_t;
1883 extern volatile MDCARHbits_t MDCARHbits @ 0x39F;
1884
1885 # 4674
1886 extern volatile unsigned char STATUS_SHAD @ 0xFE4;
1887
1888 asm("STATUS_SHAD equ 0FE4h");
1889
1890
1891 typedef union {
1892 struct {
1893 unsigned C_SHAD :1;
1894 unsigned DC_SHAD :1;
1895 unsigned Z_SHAD :1;
1896 };
1897 } STATUS_SHADbits_t;
1898 extern volatile STATUS_SHADbits_t STATUS_SHADbits @ 0xFE4;
1899
1900 # 4705
1901 extern volatile unsigned char WREG_SHAD @ 0xFE5;
1902
1903 asm("WREG_SHAD equ 0FE5h");
1904
1905
1906 typedef union {
1907 struct {
1908 unsigned WREG_SHAD :8;
1909 };
1910 } WREG_SHADbits_t;
1911 extern volatile WREG_SHADbits_t WREG_SHADbits @ 0xFE5;
1912
1913 # 4724
1914 extern volatile unsigned char BSR_SHAD @ 0xFE6;
1915
1916 asm("BSR_SHAD equ 0FE6h");
1917
1918
1919 typedef union {
1920 struct {
1921 unsigned BSR_SHAD :5;
1922 };
1923 } BSR_SHADbits_t;
1924 extern volatile BSR_SHADbits_t BSR_SHADbits @ 0xFE6;
1925
1926 # 4743
1927 extern volatile unsigned char PCLATH_SHAD @ 0xFE7;
1928
1929 asm("PCLATH_SHAD equ 0FE7h");
1930
1931
1932 typedef union {
1933 struct {
1934 unsigned PCLATH_SHAD :7;
1935 };
1936 } PCLATH_SHADbits_t;
1937 extern volatile PCLATH_SHADbits_t PCLATH_SHADbits @ 0xFE7;
1938
1939 # 4762
1940 extern volatile unsigned char FSR0L_SHAD @ 0xFE8;
1941
1942 asm("FSR0L_SHAD equ 0FE8h");
1943
1944
1945 typedef union {
1946 struct {
1947 unsigned FSR0L_SHAD :8;
1948 };
1949 } FSR0L_SHADbits_t;
1950 extern volatile FSR0L_SHADbits_t FSR0L_SHADbits @ 0xFE8;
1951
1952 # 4781
1953 extern volatile unsigned char FSR0H_SHAD @ 0xFE9;
1954
1955 asm("FSR0H_SHAD equ 0FE9h");
1956
1957
1958 typedef union {
1959 struct {
1960 unsigned FSR0H_SHAD :8;
1961 };
1962 } FSR0H_SHADbits_t;
1963 extern volatile FSR0H_SHADbits_t FSR0H_SHADbits @ 0xFE9;
1964
1965 # 4800
1966 extern volatile unsigned char FSR1L_SHAD @ 0xFEA;
1967
1968 asm("FSR1L_SHAD equ 0FEAh");
1969
1970
1971 typedef union {
1972 struct {
1973 unsigned FSR1L_SHAD :8;
1974 };
1975 } FSR1L_SHADbits_t;
1976 extern volatile FSR1L_SHADbits_t FSR1L_SHADbits @ 0xFEA;
1977
1978 # 4819
1979 extern volatile unsigned char FSR1H_SHAD @ 0xFEB;
1980
1981 asm("FSR1H_SHAD equ 0FEBh");
1982
1983
1984 typedef union {
1985 struct {
1986 unsigned FSR1H_SHAD :8;
1987 };
1988 } FSR1H_SHADbits_t;
1989 extern volatile FSR1H_SHADbits_t FSR1H_SHADbits @ 0xFEB;
1990
1991 # 4838
1992 extern volatile unsigned char STKPTR @ 0xFED;
1993
1994 asm("STKPTR equ 0FEDh");
1995
1996
1997 typedef union {
1998 struct {
1999 unsigned STKPTR :5;
2000 };
2001 } STKPTRbits_t;
2002 extern volatile STKPTRbits_t STKPTRbits @ 0xFED;
2003
2004 # 4857
2005 extern volatile unsigned char TOSL @ 0xFEE;
2006
2007 asm("TOSL equ 0FEEh");
2008
2009
2010 typedef union {
2011 struct {
2012 unsigned TOSL :8;
2013 };
2014 } TOSLbits_t;
2015 extern volatile TOSLbits_t TOSLbits @ 0xFEE;
2016
2017 # 4876
2018 extern volatile unsigned char TOSH @ 0xFEF;
2019
2020 asm("TOSH equ 0FEFh");
2021
2022
2023 typedef union {
2024 struct {
2025 unsigned TOSH :7;
2026 };
2027 } TOSHbits_t;
2028 extern volatile TOSHbits_t TOSHbits @ 0xFEF;
2029
2030 # 4901
2031 extern volatile __bit ABDEN @ (((unsigned) &BAUDCON)*8) + 0;
2032
2033 extern volatile __bit ABDOVF @ (((unsigned) &BAUDCON)*8) + 7;
2034
2035 extern volatile __bit ACKDT @ (((unsigned) &SSP1CON2)*8) + 5;
2036
2037 extern volatile __bit ACKEN @ (((unsigned) &SSP1CON2)*8) + 4;
2038
2039 extern volatile __bit ACKSTAT @ (((unsigned) &SSP1CON2)*8) + 6;
2040
2041 extern volatile __bit ACKTIM @ (((unsigned) &SSP1CON3)*8) + 7;
2042
2043 extern volatile __bit ADCS0 @ (((unsigned) &ADCON1)*8) + 4;
2044
2045 extern volatile __bit ADCS1 @ (((unsigned) &ADCON1)*8) + 5;
2046
2047 extern volatile __bit ADCS2 @ (((unsigned) &ADCON1)*8) + 6;
2048
2049 extern volatile __bit ADDEN @ (((unsigned) &RCSTA)*8) + 3;
2050
2051 extern volatile __bit ADFM @ (((unsigned) &ADCON1)*8) + 7;
2052
2053 extern volatile __bit ADFVR0 @ (((unsigned) &FVRCON)*8) + 0;
2054
2055 extern volatile __bit ADFVR1 @ (((unsigned) &FVRCON)*8) + 1;
2056
2057 extern volatile __bit ADGO @ (((unsigned) &ADCON0)*8) + 1;
2058
2059 extern volatile __bit ADIE @ (((unsigned) &PIE1)*8) + 6;
2060
2061 extern volatile __bit ADIF @ (((unsigned) &PIR1)*8) + 6;
2062
2063 extern volatile __bit ADON @ (((unsigned) &ADCON0)*8) + 0;
2064
2065 extern volatile __bit ADPREF0 @ (((unsigned) &ADCON1)*8) + 0;
2066
2067 extern volatile __bit ADPREF1 @ (((unsigned) &ADCON1)*8) + 1;
2068
2069 extern volatile __bit AHEN @ (((unsigned) &SSP1CON3)*8) + 1;
2070
2071 extern volatile __bit AN0 @ (((unsigned) &PORTA)*8) + 0;
2072
2073 extern volatile __bit AN1 @ (((unsigned) &PORTA)*8) + 1;
2074
2075 extern volatile __bit AN2 @ (((unsigned) &PORTA)*8) + 2;
2076
2077 extern volatile __bit AN3 @ (((unsigned) &PORTA)*8) + 4;
2078
2079 extern volatile __bit ANSA0 @ (((unsigned) &ANSELA)*8) + 0;
2080
2081 extern volatile __bit ANSA1 @ (((unsigned) &ANSELA)*8) + 1;
2082
2083 extern volatile __bit ANSA2 @ (((unsigned) &ANSELA)*8) + 2;
2084
2085 extern volatile __bit ANSA4 @ (((unsigned) &ANSELA)*8) + 4;
2086
2087 extern volatile __bit BCL1IE @ (((unsigned) &PIE2)*8) + 3;
2088
2089 extern volatile __bit BCL1IF @ (((unsigned) &PIR2)*8) + 3;
2090
2091 extern volatile __bit BF @ (((unsigned) &SSP1STAT)*8) + 0;
2092
2093 extern volatile __bit BOEN @ (((unsigned) &SSP1CON3)*8) + 4;
2094
2095 extern volatile __bit BORRDY @ (((unsigned) &BORCON)*8) + 0;
2096
2097 extern volatile __bit BRG16 @ (((unsigned) &BAUDCON)*8) + 3;
2098
2099 extern volatile __bit BRGH @ (((unsigned) &TXSTA)*8) + 2;
2100
2101 extern volatile __bit BSR0 @ (((unsigned) &BSR)*8) + 0;
2102
2103 extern volatile __bit BSR1 @ (((unsigned) &BSR)*8) + 1;
2104
2105 extern volatile __bit BSR2 @ (((unsigned) &BSR)*8) + 2;
2106
2107 extern volatile __bit BSR3 @ (((unsigned) &BSR)*8) + 3;
2108
2109 extern volatile __bit BSR4 @ (((unsigned) &BSR)*8) + 4;
2110
2111 extern volatile __bit C1HYS @ (((unsigned) &CM1CON0)*8) + 1;
2112
2113 extern volatile __bit C1IE @ (((unsigned) &PIE2)*8) + 5;
2114
2115 extern volatile __bit C1IF @ (((unsigned) &PIR2)*8) + 5;
2116
2117 extern volatile __bit C1IN0N @ (((unsigned) &PORTA)*8) + 1;
2118
2119 extern volatile __bit C1IN1N @ (((unsigned) &PORTA)*8) + 4;
2120
2121 extern volatile __bit C1INP @ (((unsigned) &PORTA)*8) + 0;
2122
2123 extern volatile __bit C1INTN @ (((unsigned) &CM1CON1)*8) + 6;
2124
2125 extern volatile __bit C1INTP @ (((unsigned) &CM1CON1)*8) + 7;
2126
2127 extern volatile __bit C1NCH0 @ (((unsigned) &CM1CON1)*8) + 0;
2128
2129 extern volatile __bit C1OE @ (((unsigned) &CM1CON0)*8) + 5;
2130
2131 extern volatile __bit C1ON @ (((unsigned) &CM1CON0)*8) + 7;
2132
2133 extern volatile __bit C1PCH0 @ (((unsigned) &CM1CON1)*8) + 4;
2134
2135 extern volatile __bit C1PCH1 @ (((unsigned) &CM1CON1)*8) + 5;
2136
2137 extern volatile __bit C1POL @ (((unsigned) &CM1CON0)*8) + 4;
2138
2139 extern volatile __bit C1SP @ (((unsigned) &CM1CON0)*8) + 2;
2140
2141 extern volatile __bit C1SYNC @ (((unsigned) &CM1CON0)*8) + 0;
2142
2143 extern volatile __bit CARRY @ (((unsigned) &STATUS)*8) + 0;
2144
2145 extern volatile __bit CCP1AS0 @ (((unsigned) &CCP1AS)*8) + 4;
2146
2147 extern volatile __bit CCP1AS1 @ (((unsigned) &CCP1AS)*8) + 5;
2148
2149 extern volatile __bit CCP1AS2 @ (((unsigned) &CCP1AS)*8) + 6;
2150
2151 extern volatile __bit CCP1ASE @ (((unsigned) &CCP1AS)*8) + 7;
2152
2153 extern volatile __bit CCP1IE @ (((unsigned) &PIE1)*8) + 2;
2154
2155 extern volatile __bit CCP1IF @ (((unsigned) &PIR1)*8) + 2;
2156
2157 extern volatile __bit CCP1M0 @ (((unsigned) &CCP1CON)*8) + 0;
2158
2159 extern volatile __bit CCP1M1 @ (((unsigned) &CCP1CON)*8) + 1;
2160
2161 extern volatile __bit CCP1M2 @ (((unsigned) &CCP1CON)*8) + 2;
2162
2163 extern volatile __bit CCP1M3 @ (((unsigned) &CCP1CON)*8) + 3;
2164
2165 extern volatile __bit CCP1SEL @ (((unsigned) &APFCON)*8) + 0;
2166
2167 extern volatile __bit CDAFVR0 @ (((unsigned) &FVRCON)*8) + 2;
2168
2169 extern volatile __bit CDAFVR1 @ (((unsigned) &FVRCON)*8) + 3;
2170
2171 extern volatile __bit CFGS @ (((unsigned) &EECON1)*8) + 6;
2172
2173 extern volatile __bit CHS0 @ (((unsigned) &ADCON0)*8) + 2;
2174
2175 extern volatile __bit CHS1 @ (((unsigned) &ADCON0)*8) + 3;
2176
2177 extern volatile __bit CHS2 @ (((unsigned) &ADCON0)*8) + 4;
2178
2179 extern volatile __bit CHS3 @ (((unsigned) &ADCON0)*8) + 5;
2180
2181 extern volatile __bit CHS4 @ (((unsigned) &ADCON0)*8) + 6;
2182
2183 extern volatile __bit CKE @ (((unsigned) &SSP1STAT)*8) + 6;
2184
2185 extern volatile __bit CKP @ (((unsigned) &SSP1CON1)*8) + 4;
2186
2187 extern volatile __bit CLKIN @ (((unsigned) &PORTA)*8) + 5;
2188
2189 extern volatile __bit CLKOUT @ (((unsigned) &PORTA)*8) + 4;
2190
2191 extern volatile __bit CLKR @ (((unsigned) &PORTA)*8) + 4;
2192
2193 extern volatile __bit CLKRDC0 @ (((unsigned) &CLKRCON)*8) + 3;
2194
2195 extern volatile __bit CLKRDC1 @ (((unsigned) &CLKRCON)*8) + 4;
2196
2197 extern volatile __bit CLKRDIV0 @ (((unsigned) &CLKRCON)*8) + 0;
2198
2199 extern volatile __bit CLKRDIV1 @ (((unsigned) &CLKRCON)*8) + 1;
2200
2201 extern volatile __bit CLKRDIV2 @ (((unsigned) &CLKRCON)*8) + 2;
2202
2203 extern volatile __bit CLKREN @ (((unsigned) &CLKRCON)*8) + 7;
2204
2205 extern volatile __bit CLKROE @ (((unsigned) &CLKRCON)*8) + 6;
2206
2207 extern volatile __bit CLKRSLR @ (((unsigned) &CLKRCON)*8) + 5;
2208
2209 extern volatile __bit CPS0 @ (((unsigned) &PORTA)*8) + 0;
2210
2211 extern volatile __bit CPS1 @ (((unsigned) &PORTA)*8) + 1;
2212
2213 extern volatile __bit CPS2 @ (((unsigned) &PORTA)*8) + 2;
2214
2215 extern volatile __bit CPS3 @ (((unsigned) &PORTA)*8) + 4;
2216
2217 extern volatile __bit CPSCH0 @ (((unsigned) &CPSCON1)*8) + 0;
2218
2219 extern volatile __bit CPSCH1 @ (((unsigned) &CPSCON1)*8) + 1;
2220
2221 extern volatile __bit CPSON @ (((unsigned) &CPSCON0)*8) + 7;
2222
2223 extern volatile __bit CPSOUT @ (((unsigned) &CPSCON0)*8) + 1;
2224
2225 extern volatile __bit CPSRM @ (((unsigned) &CPSCON0)*8) + 6;
2226
2227 extern volatile __bit CPSRNG0 @ (((unsigned) &CPSCON0)*8) + 2;
2228
2229 extern volatile __bit CPSRNG1 @ (((unsigned) &CPSCON0)*8) + 3;
2230
2231 extern volatile __bit CREN @ (((unsigned) &RCSTA)*8) + 4;
2232
2233 extern volatile __bit CSRC @ (((unsigned) &TXSTA)*8) + 7;
2234
2235 extern volatile __bit C_SHAD @ (((unsigned) &STATUS_SHAD)*8) + 0;
2236
2237 extern volatile __bit DACEN @ (((unsigned) &DACCON0)*8) + 7;
2238
2239 extern volatile __bit DACLPS @ (((unsigned) &DACCON0)*8) + 6;
2240
2241 extern volatile __bit DACOE @ (((unsigned) &DACCON0)*8) + 5;
2242
2243 extern volatile __bit DACOUT @ (((unsigned) &PORTA)*8) + 0;
2244
2245 extern volatile __bit DACPSS0 @ (((unsigned) &DACCON0)*8) + 2;
2246
2247 extern volatile __bit DACPSS1 @ (((unsigned) &DACCON0)*8) + 3;
2248
2249 extern volatile __bit DACR0 @ (((unsigned) &DACCON1)*8) + 0;
2250
2251 extern volatile __bit DACR1 @ (((unsigned) &DACCON1)*8) + 1;
2252
2253 extern volatile __bit DACR2 @ (((unsigned) &DACCON1)*8) + 2;
2254
2255 extern volatile __bit DACR3 @ (((unsigned) &DACCON1)*8) + 3;
2256
2257 extern volatile __bit DACR4 @ (((unsigned) &DACCON1)*8) + 4;
2258
2259 extern volatile __bit DC @ (((unsigned) &STATUS)*8) + 1;
2260
2261 extern volatile __bit DC1B0 @ (((unsigned) &CCP1CON)*8) + 4;
2262
2263 extern volatile __bit DC1B1 @ (((unsigned) &CCP1CON)*8) + 5;
2264
2265 extern volatile __bit DC_SHAD @ (((unsigned) &STATUS_SHAD)*8) + 1;
2266
2267 extern volatile __bit DHEN @ (((unsigned) &SSP1CON3)*8) + 0;
2268
2269 extern volatile __bit D_nA @ (((unsigned) &SSP1STAT)*8) + 5;
2270
2271 extern volatile __bit EEIE @ (((unsigned) &PIE2)*8) + 4;
2272
2273 extern volatile __bit EEIF @ (((unsigned) &PIR2)*8) + 4;
2274
2275 extern volatile __bit EEPGD @ (((unsigned) &EECON1)*8) + 7;
2276
2277 extern volatile __bit FERR @ (((unsigned) &RCSTA)*8) + 2;
2278
2279 extern volatile __bit FLT0 @ (((unsigned) &PORTA)*8) + 2;
2280
2281 extern volatile __bit FREE @ (((unsigned) &EECON1)*8) + 4;
2282
2283 extern volatile __bit FVREN @ (((unsigned) &FVRCON)*8) + 7;
2284
2285 extern volatile __bit FVRRDY @ (((unsigned) &FVRCON)*8) + 6;
2286
2287 extern volatile __bit GCEN @ (((unsigned) &SSP1CON2)*8) + 7;
2288
2289 extern volatile __bit GIE @ (((unsigned) &INTCON)*8) + 7;
2290
2291 extern volatile __bit GO @ (((unsigned) &ADCON0)*8) + 1;
2292
2293 extern volatile __bit GO_nDONE @ (((unsigned) &ADCON0)*8) + 1;
2294
2295 extern volatile __bit HFIOFL @ (((unsigned) &OSCSTAT)*8) + 3;
2296
2297 extern volatile __bit HFIOFR @ (((unsigned) &OSCSTAT)*8) + 4;
2298
2299 extern volatile __bit HFIOFS @ (((unsigned) &OSCSTAT)*8) + 0;
2300
2301 extern volatile __bit INTE @ (((unsigned) &INTCON)*8) + 4;
2302
2303 extern volatile __bit INTEDG @ (((unsigned) &OPTION_REG)*8) + 6;
2304
2305 extern volatile __bit INTF @ (((unsigned) &INTCON)*8) + 1;
2306
2307 extern volatile __bit IOCAF0 @ (((unsigned) &IOCAF)*8) + 0;
2308
2309 extern volatile __bit IOCAF1 @ (((unsigned) &IOCAF)*8) + 1;
2310
2311 extern volatile __bit IOCAF2 @ (((unsigned) &IOCAF)*8) + 2;
2312
2313 extern volatile __bit IOCAF3 @ (((unsigned) &IOCAF)*8) + 3;
2314
2315 extern volatile __bit IOCAF4 @ (((unsigned) &IOCAF)*8) + 4;
2316
2317 extern volatile __bit IOCAF5 @ (((unsigned) &IOCAF)*8) + 5;
2318
2319 extern volatile __bit IOCAN0 @ (((unsigned) &IOCAN)*8) + 0;
2320
2321 extern volatile __bit IOCAN1 @ (((unsigned) &IOCAN)*8) + 1;
2322
2323 extern volatile __bit IOCAN2 @ (((unsigned) &IOCAN)*8) + 2;
2324
2325 extern volatile __bit IOCAN3 @ (((unsigned) &IOCAN)*8) + 3;
2326
2327 extern volatile __bit IOCAN4 @ (((unsigned) &IOCAN)*8) + 4;
2328
2329 extern volatile __bit IOCAN5 @ (((unsigned) &IOCAN)*8) + 5;
2330
2331 extern volatile __bit IOCAP0 @ (((unsigned) &IOCAP)*8) + 0;
2332
2333 extern volatile __bit IOCAP1 @ (((unsigned) &IOCAP)*8) + 1;
2334
2335 extern volatile __bit IOCAP2 @ (((unsigned) &IOCAP)*8) + 2;
2336
2337 extern volatile __bit IOCAP3 @ (((unsigned) &IOCAP)*8) + 3;
2338
2339 extern volatile __bit IOCAP4 @ (((unsigned) &IOCAP)*8) + 4;
2340
2341 extern volatile __bit IOCAP5 @ (((unsigned) &IOCAP)*8) + 5;
2342
2343 extern volatile __bit IOCIE @ (((unsigned) &INTCON)*8) + 3;
2344
2345 extern volatile __bit IOCIF @ (((unsigned) &INTCON)*8) + 0;
2346
2347 extern volatile __bit IRCF0 @ (((unsigned) &OSCCON)*8) + 3;
2348
2349 extern volatile __bit IRCF1 @ (((unsigned) &OSCCON)*8) + 4;
2350
2351 extern volatile __bit IRCF2 @ (((unsigned) &OSCCON)*8) + 5;
2352
2353 extern volatile __bit IRCF3 @ (((unsigned) &OSCCON)*8) + 6;
2354
2355 extern volatile __bit LATA0 @ (((unsigned) &LATA)*8) + 0;
2356
2357 extern volatile __bit LATA1 @ (((unsigned) &LATA)*8) + 1;
2358
2359 extern volatile __bit LATA2 @ (((unsigned) &LATA)*8) + 2;
2360
2361 extern volatile __bit LATA4 @ (((unsigned) &LATA)*8) + 4;
2362
2363 extern volatile __bit LATA5 @ (((unsigned) &LATA)*8) + 5;
2364
2365 extern volatile __bit LFIOFR @ (((unsigned) &OSCSTAT)*8) + 1;
2366
2367 extern volatile __bit LWLO @ (((unsigned) &EECON1)*8) + 5;
2368
2369 extern volatile __bit MC1OUT @ (((unsigned) &CMOUT)*8) + 0;
2370
2371 extern volatile __bit MDBIT @ (((unsigned) &MDCON)*8) + 0;
2372
2373 extern volatile __bit MDCH0 @ (((unsigned) &MDCARH)*8) + 0;
2374
2375 extern volatile __bit MDCH1 @ (((unsigned) &MDCARH)*8) + 1;
2376
2377 extern volatile __bit MDCH2 @ (((unsigned) &MDCARH)*8) + 2;
2378
2379 extern volatile __bit MDCH3 @ (((unsigned) &MDCARH)*8) + 3;
2380
2381 extern volatile __bit MDCHODIS @ (((unsigned) &MDCARH)*8) + 7;
2382
2383 extern volatile __bit MDCHPOL @ (((unsigned) &MDCARH)*8) + 6;
2384
2385 extern volatile __bit MDCHSYNC @ (((unsigned) &MDCARH)*8) + 5;
2386
2387 extern volatile __bit MDCIN1 @ (((unsigned) &PORTA)*8) + 2;
2388
2389 extern volatile __bit MDCIN2 @ (((unsigned) &PORTA)*8) + 4;
2390
2391 extern volatile __bit MDCL0 @ (((unsigned) &MDCARL)*8) + 0;
2392
2393 extern volatile __bit MDCL1 @ (((unsigned) &MDCARL)*8) + 1;
2394
2395 extern volatile __bit MDCL2 @ (((unsigned) &MDCARL)*8) + 2;
2396
2397 extern volatile __bit MDCL3 @ (((unsigned) &MDCARL)*8) + 3;
2398
2399 extern volatile __bit MDCLODIS @ (((unsigned) &MDCARL)*8) + 7;
2400
2401 extern volatile __bit MDCLPOL @ (((unsigned) &MDCARL)*8) + 6;
2402
2403 extern volatile __bit MDCLSYNC @ (((unsigned) &MDCARL)*8) + 5;
2404
2405 extern volatile __bit MDEN @ (((unsigned) &MDCON)*8) + 7;
2406
2407 extern volatile __bit MDMIN @ (((unsigned) &PORTA)*8) + 1;
2408
2409 extern volatile __bit MDMS0 @ (((unsigned) &MDSRC)*8) + 0;
2410
2411 extern volatile __bit MDMS1 @ (((unsigned) &MDSRC)*8) + 1;
2412
2413 extern volatile __bit MDMS2 @ (((unsigned) &MDSRC)*8) + 2;
2414
2415 extern volatile __bit MDMS3 @ (((unsigned) &MDSRC)*8) + 3;
2416
2417 extern volatile __bit MDMSODIS @ (((unsigned) &MDSRC)*8) + 7;
2418
2419 extern volatile __bit MDOE @ (((unsigned) &MDCON)*8) + 6;
2420
2421 extern volatile __bit MDOPOL @ (((unsigned) &MDCON)*8) + 4;
2422
2423 extern volatile __bit MDSLR @ (((unsigned) &MDCON)*8) + 5;
2424
2425 extern volatile __bit MFIOFR @ (((unsigned) &OSCSTAT)*8) + 2;
2426
2427 extern volatile __bit OERR @ (((unsigned) &RCSTA)*8) + 1;
2428
2429 extern volatile __bit OSC1 @ (((unsigned) &PORTA)*8) + 5;
2430
2431 extern volatile __bit OSC2 @ (((unsigned) &PORTA)*8) + 4;
2432
2433 extern volatile __bit OSFIE @ (((unsigned) &PIE2)*8) + 7;
2434
2435 extern volatile __bit OSFIF @ (((unsigned) &PIR2)*8) + 7;
2436
2437 extern volatile __bit OSTS @ (((unsigned) &OSCSTAT)*8) + 5;
2438
2439 extern volatile __bit P1BSEL @ (((unsigned) &APFCON)*8) + 1;
2440
2441 extern volatile __bit P1DC0 @ (((unsigned) &PWM1CON)*8) + 0;
2442
2443 extern volatile __bit P1DC1 @ (((unsigned) &PWM1CON)*8) + 1;
2444
2445 extern volatile __bit P1DC2 @ (((unsigned) &PWM1CON)*8) + 2;
2446
2447 extern volatile __bit P1DC3 @ (((unsigned) &PWM1CON)*8) + 3;
2448
2449 extern volatile __bit P1DC4 @ (((unsigned) &PWM1CON)*8) + 4;
2450
2451 extern volatile __bit P1DC5 @ (((unsigned) &PWM1CON)*8) + 5;
2452
2453 extern volatile __bit P1DC6 @ (((unsigned) &PWM1CON)*8) + 6;
2454
2455 extern volatile __bit P1M0 @ (((unsigned) &CCP1CON)*8) + 6;
2456
2457 extern volatile __bit P1M1 @ (((unsigned) &CCP1CON)*8) + 7;
2458
2459 extern volatile __bit P1RSEN @ (((unsigned) &PWM1CON)*8) + 7;
2460
2461 extern volatile __bit PCIE @ (((unsigned) &SSP1CON3)*8) + 6;
2462
2463 extern volatile __bit PEIE @ (((unsigned) &INTCON)*8) + 6;
2464
2465 extern volatile __bit PEN @ (((unsigned) &SSP1CON2)*8) + 2;
2466
2467 extern volatile __bit PLLR @ (((unsigned) &OSCSTAT)*8) + 6;
2468
2469 extern volatile __bit PS0 @ (((unsigned) &OPTION_REG)*8) + 0;
2470
2471 extern volatile __bit PS1 @ (((unsigned) &OPTION_REG)*8) + 1;
2472
2473 extern volatile __bit PS2 @ (((unsigned) &OPTION_REG)*8) + 2;
2474
2475 extern volatile __bit PSA @ (((unsigned) &OPTION_REG)*8) + 3;
2476
2477 extern volatile __bit PSS1AC0 @ (((unsigned) &CCP1AS)*8) + 2;
2478
2479 extern volatile __bit PSS1AC1 @ (((unsigned) &CCP1AS)*8) + 3;
2480
2481 extern volatile __bit PSS1BD0 @ (((unsigned) &CCP1AS)*8) + 0;
2482
2483 extern volatile __bit PSS1BD1 @ (((unsigned) &CCP1AS)*8) + 1;
2484
2485 extern volatile __bit RA0 @ (((unsigned) &PORTA)*8) + 0;
2486
2487 extern volatile __bit RA1 @ (((unsigned) &PORTA)*8) + 1;
2488
2489 extern volatile __bit RA2 @ (((unsigned) &PORTA)*8) + 2;
2490
2491 extern volatile __bit RA3 @ (((unsigned) &PORTA)*8) + 3;
2492
2493 extern volatile __bit RA4 @ (((unsigned) &PORTA)*8) + 4;
2494
2495 extern volatile __bit RA5 @ (((unsigned) &PORTA)*8) + 5;
2496
2497 extern volatile __bit RCEN @ (((unsigned) &SSP1CON2)*8) + 3;
2498
2499 extern volatile __bit RCIDL @ (((unsigned) &BAUDCON)*8) + 6;
2500
2501 extern volatile __bit RCIE @ (((unsigned) &PIE1)*8) + 5;
2502
2503 extern volatile __bit RCIF @ (((unsigned) &PIR1)*8) + 5;
2504
2505 extern volatile __bit RD @ (((unsigned) &EECON1)*8) + 0;
2506
2507 extern volatile __bit RSEN @ (((unsigned) &SSP1CON2)*8) + 1;
2508
2509 extern volatile __bit RX9 @ (((unsigned) &RCSTA)*8) + 6;
2510
2511 extern volatile __bit RX9D @ (((unsigned) &RCSTA)*8) + 0;
2512
2513 extern volatile __bit RXDTSEL @ (((unsigned) &APFCON)*8) + 7;
2514
2515 extern volatile __bit R_nW @ (((unsigned) &SSP1STAT)*8) + 2;
2516
2517 extern volatile __bit SBCDE @ (((unsigned) &SSP1CON3)*8) + 2;
2518
2519 extern volatile __bit SBOREN @ (((unsigned) &BORCON)*8) + 7;
2520
2521 extern volatile __bit SCIE @ (((unsigned) &SSP1CON3)*8) + 5;
2522
2523 extern volatile __bit SCK @ (((unsigned) &PORTA)*8) + 1;
2524
2525 extern volatile __bit SCKP @ (((unsigned) &BAUDCON)*8) + 4;
2526
2527 extern volatile __bit SCL @ (((unsigned) &PORTA)*8) + 1;
2528
2529 extern volatile __bit SCS0 @ (((unsigned) &OSCCON)*8) + 0;
2530
2531 extern volatile __bit SCS1 @ (((unsigned) &OSCCON)*8) + 1;
2532
2533 extern volatile __bit SDA @ (((unsigned) &PORTA)*8) + 2;
2534
2535 extern volatile __bit SDAHT @ (((unsigned) &SSP1CON3)*8) + 3;
2536
2537 extern volatile __bit SDI @ (((unsigned) &PORTA)*8) + 2;
2538
2539 extern volatile __bit SDO1SEL @ (((unsigned) &APFCON)*8) + 6;
2540
2541 extern volatile __bit SDOSEL @ (((unsigned) &APFCON)*8) + 6;
2542
2543 extern volatile __bit SEN @ (((unsigned) &SSP1CON2)*8) + 0;
2544
2545 extern volatile __bit SENDB @ (((unsigned) &TXSTA)*8) + 3;
2546
2547 extern volatile __bit SMP @ (((unsigned) &SSP1STAT)*8) + 7;
2548
2549 extern volatile __bit SPEN @ (((unsigned) &RCSTA)*8) + 7;
2550
2551 extern volatile __bit SPLLEN @ (((unsigned) &OSCCON)*8) + 7;
2552
2553 extern volatile __bit SRCLK0 @ (((unsigned) &SRCON0)*8) + 4;
2554
2555 extern volatile __bit SRCLK1 @ (((unsigned) &SRCON0)*8) + 5;
2556
2557 extern volatile __bit SRCLK2 @ (((unsigned) &SRCON0)*8) + 6;
2558
2559 extern volatile __bit SREN @ (((unsigned) &RCSTA)*8) + 5;
2560
2561 extern volatile __bit SRI @ (((unsigned) &PORTA)*8) + 1;
2562
2563 extern volatile __bit SRLEN @ (((unsigned) &SRCON0)*8) + 7;
2564
2565 extern volatile __bit SRNQ @ (((unsigned) &PORTA)*8) + 5;
2566
2567 extern volatile __bit SRNQEN @ (((unsigned) &SRCON0)*8) + 2;
2568
2569 extern volatile __bit SRPR @ (((unsigned) &SRCON0)*8) + 0;
2570
2571 extern volatile __bit SRPS @ (((unsigned) &SRCON0)*8) + 1;
2572
2573 extern volatile __bit SRQ @ (((unsigned) &PORTA)*8) + 2;
2574
2575 extern volatile __bit SRQEN @ (((unsigned) &SRCON0)*8) + 3;
2576
2577 extern volatile __bit SRRC1E @ (((unsigned) &SRCON1)*8) + 0;
2578
2579 extern volatile __bit SRRCKE @ (((unsigned) &SRCON1)*8) + 2;
2580
2581 extern volatile __bit SRRPE @ (((unsigned) &SRCON1)*8) + 3;
2582
2583 extern volatile __bit SRSC1E @ (((unsigned) &SRCON1)*8) + 4;
2584
2585 extern volatile __bit SRSCKE @ (((unsigned) &SRCON1)*8) + 6;
2586
2587 extern volatile __bit SRSPE @ (((unsigned) &SRCON1)*8) + 7;
2588
2589 extern volatile __bit SS1SEL @ (((unsigned) &APFCON)*8) + 5;
2590
2591 extern volatile __bit SSP1IE @ (((unsigned) &PIE1)*8) + 3;
2592
2593 extern volatile __bit SSP1IF @ (((unsigned) &PIR1)*8) + 3;
2594
2595 extern volatile __bit SSPEN @ (((unsigned) &SSP1CON1)*8) + 5;
2596
2597 extern volatile __bit SSPM0 @ (((unsigned) &SSP1CON1)*8) + 0;
2598
2599 extern volatile __bit SSPM1 @ (((unsigned) &SSP1CON1)*8) + 1;
2600
2601 extern volatile __bit SSPM2 @ (((unsigned) &SSP1CON1)*8) + 2;
2602
2603 extern volatile __bit SSPM3 @ (((unsigned) &SSP1CON1)*8) + 3;
2604
2605 extern volatile __bit SSPOV @ (((unsigned) &SSP1CON1)*8) + 6;
2606
2607 extern volatile __bit SSSEL @ (((unsigned) &APFCON)*8) + 5;
2608
2609 extern volatile __bit STKOVF @ (((unsigned) &PCON)*8) + 7;
2610
2611 extern volatile __bit STKUNF @ (((unsigned) &PCON)*8) + 6;
2612
2613 extern volatile __bit STR1A @ (((unsigned) &PSTR1CON)*8) + 0;
2614
2615 extern volatile __bit STR1B @ (((unsigned) &PSTR1CON)*8) + 1;
2616
2617 extern volatile __bit STR1C @ (((unsigned) &PSTR1CON)*8) + 2;
2618
2619 extern volatile __bit STR1D @ (((unsigned) &PSTR1CON)*8) + 3;
2620
2621 extern volatile __bit STR1SYNC @ (((unsigned) &PSTR1CON)*8) + 4;
2622
2623 extern volatile __bit SWDTEN @ (((unsigned) &WDTCON)*8) + 0;
2624
2625 extern volatile __bit SYNC @ (((unsigned) &TXSTA)*8) + 4;
2626
2627 extern volatile __bit T0CKI @ (((unsigned) &PORTA)*8) + 2;
2628
2629 extern volatile __bit T0CS @ (((unsigned) &OPTION_REG)*8) + 5;
2630
2631 extern volatile __bit T0IE @ (((unsigned) &INTCON)*8) + 5;
2632
2633 extern volatile __bit T0IF @ (((unsigned) &INTCON)*8) + 2;
2634
2635 extern volatile __bit T0SE @ (((unsigned) &OPTION_REG)*8) + 4;
2636
2637 extern volatile __bit T0XCS @ (((unsigned) &CPSCON0)*8) + 0;
2638
2639 extern volatile __bit T1CKI @ (((unsigned) &PORTA)*8) + 5;
2640
2641 extern volatile __bit T1CKPS0 @ (((unsigned) &T1CON)*8) + 4;
2642
2643 extern volatile __bit T1CKPS1 @ (((unsigned) &T1CON)*8) + 5;
2644
2645 extern volatile __bit T1GGO @ (((unsigned) &T1GCON)*8) + 3;
2646
2647 extern volatile __bit T1GGO_nDONE @ (((unsigned) &T1GCON)*8) + 3;
2648
2649 extern volatile __bit T1GPOL @ (((unsigned) &T1GCON)*8) + 6;
2650
2651 extern volatile __bit T1GSEL @ (((unsigned) &APFCON)*8) + 3;
2652
2653 extern volatile __bit T1GSPM @ (((unsigned) &T1GCON)*8) + 4;
2654
2655 extern volatile __bit T1GSS0 @ (((unsigned) &T1GCON)*8) + 0;
2656
2657 extern volatile __bit T1GSS1 @ (((unsigned) &T1GCON)*8) + 1;
2658
2659 extern volatile __bit T1GTM @ (((unsigned) &T1GCON)*8) + 5;
2660
2661 extern volatile __bit T1GVAL @ (((unsigned) &T1GCON)*8) + 2;
2662
2663 extern volatile __bit T1OSCEN @ (((unsigned) &T1CON)*8) + 3;
2664
2665 extern volatile __bit T1OSCR @ (((unsigned) &OSCSTAT)*8) + 7;
2666
2667 extern volatile __bit T1OSI @ (((unsigned) &PORTA)*8) + 5;
2668
2669 extern volatile __bit T1OSO @ (((unsigned) &PORTA)*8) + 4;
2670
2671 extern volatile __bit T2CKPS0 @ (((unsigned) &T2CON)*8) + 0;
2672
2673 extern volatile __bit T2CKPS1 @ (((unsigned) &T2CON)*8) + 1;
2674
2675 extern volatile __bit T2OUTPS0 @ (((unsigned) &T2CON)*8) + 3;
2676
2677 extern volatile __bit T2OUTPS1 @ (((unsigned) &T2CON)*8) + 4;
2678
2679 extern volatile __bit T2OUTPS2 @ (((unsigned) &T2CON)*8) + 5;
2680
2681 extern volatile __bit T2OUTPS3 @ (((unsigned) &T2CON)*8) + 6;
2682
2683 extern volatile __bit TMR0CS @ (((unsigned) &OPTION_REG)*8) + 5;
2684
2685 extern volatile __bit TMR0IE @ (((unsigned) &INTCON)*8) + 5;
2686
2687 extern volatile __bit TMR0IF @ (((unsigned) &INTCON)*8) + 2;
2688
2689 extern volatile __bit TMR0SE @ (((unsigned) &OPTION_REG)*8) + 4;
2690
2691 extern volatile __bit TMR1CS0 @ (((unsigned) &T1CON)*8) + 6;
2692
2693 extern volatile __bit TMR1CS1 @ (((unsigned) &T1CON)*8) + 7;
2694
2695 extern volatile __bit TMR1GE @ (((unsigned) &T1GCON)*8) + 7;
2696
2697 extern volatile __bit TMR1GIE @ (((unsigned) &PIE1)*8) + 7;
2698
2699 extern volatile __bit TMR1GIF @ (((unsigned) &PIR1)*8) + 7;
2700
2701 extern volatile __bit TMR1IE @ (((unsigned) &PIE1)*8) + 0;
2702
2703 extern volatile __bit TMR1IF @ (((unsigned) &PIR1)*8) + 0;
2704
2705 extern volatile __bit TMR1ON @ (((unsigned) &T1CON)*8) + 0;
2706
2707 extern volatile __bit TMR2IE @ (((unsigned) &PIE1)*8) + 1;
2708
2709 extern volatile __bit TMR2IF @ (((unsigned) &PIR1)*8) + 1;
2710
2711 extern volatile __bit TMR2ON @ (((unsigned) &T2CON)*8) + 2;
2712
2713 extern volatile __bit TRISA0 @ (((unsigned) &TRISA)*8) + 0;
2714
2715 extern volatile __bit TRISA1 @ (((unsigned) &TRISA)*8) + 1;
2716
2717 extern volatile __bit TRISA2 @ (((unsigned) &TRISA)*8) + 2;
2718
2719 extern volatile __bit TRISA3 @ (((unsigned) &TRISA)*8) + 3;
2720
2721 extern volatile __bit TRISA4 @ (((unsigned) &TRISA)*8) + 4;
2722
2723 extern volatile __bit TRISA5 @ (((unsigned) &TRISA)*8) + 5;
2724
2725 extern volatile __bit TRMT @ (((unsigned) &TXSTA)*8) + 1;
2726
2727 extern volatile __bit TSEN @ (((unsigned) &FVRCON)*8) + 5;
2728
2729 extern volatile __bit TSRNG @ (((unsigned) &FVRCON)*8) + 4;
2730
2731 extern volatile __bit TUN0 @ (((unsigned) &OSCTUNE)*8) + 0;
2732
2733 extern volatile __bit TUN1 @ (((unsigned) &OSCTUNE)*8) + 1;
2734
2735 extern volatile __bit TUN2 @ (((unsigned) &OSCTUNE)*8) + 2;
2736
2737 extern volatile __bit TUN3 @ (((unsigned) &OSCTUNE)*8) + 3;
2738
2739 extern volatile __bit TUN4 @ (((unsigned) &OSCTUNE)*8) + 4;
2740
2741 extern volatile __bit TUN5 @ (((unsigned) &OSCTUNE)*8) + 5;
2742
2743 extern volatile __bit TX9 @ (((unsigned) &TXSTA)*8) + 6;
2744
2745 extern volatile __bit TX9D @ (((unsigned) &TXSTA)*8) + 0;
2746
2747 extern volatile __bit TXCKSEL @ (((unsigned) &APFCON)*8) + 2;
2748
2749 extern volatile __bit TXEN @ (((unsigned) &TXSTA)*8) + 5;
2750
2751 extern volatile __bit TXIE @ (((unsigned) &PIE1)*8) + 4;
2752
2753 extern volatile __bit TXIF @ (((unsigned) &PIR1)*8) + 4;
2754
2755 extern volatile __bit UA @ (((unsigned) &SSP1STAT)*8) + 1;
2756
2757 extern volatile __bit WCOL @ (((unsigned) &SSP1CON1)*8) + 7;
2758
2759 extern volatile __bit WDTPS0 @ (((unsigned) &WDTCON)*8) + 1;
2760
2761 extern volatile __bit WDTPS1 @ (((unsigned) &WDTCON)*8) + 2;
2762
2763 extern volatile __bit WDTPS2 @ (((unsigned) &WDTCON)*8) + 3;
2764
2765 extern volatile __bit WDTPS3 @ (((unsigned) &WDTCON)*8) + 4;
2766
2767 extern volatile __bit WDTPS4 @ (((unsigned) &WDTCON)*8) + 5;
2768
2769 extern volatile __bit WPUA0 @ (((unsigned) &WPUA)*8) + 0;
2770
2771 extern volatile __bit WPUA1 @ (((unsigned) &WPUA)*8) + 1;
2772
2773 extern volatile __bit WPUA2 @ (((unsigned) &WPUA)*8) + 2;
2774
2775 extern volatile __bit WPUA3 @ (((unsigned) &WPUA)*8) + 3;
2776
2777 extern volatile __bit WPUA4 @ (((unsigned) &WPUA)*8) + 4;
2778
2779 extern volatile __bit WPUA5 @ (((unsigned) &WPUA)*8) + 5;
2780
2781 extern volatile __bit WR @ (((unsigned) &EECON1)*8) + 1;
2782
2783 extern volatile __bit WREN @ (((unsigned) &EECON1)*8) + 2;
2784
2785 extern volatile __bit WRERR @ (((unsigned) &EECON1)*8) + 3;
2786
2787 extern volatile __bit WUE @ (((unsigned) &BAUDCON)*8) + 1;
2788
2789 extern volatile __bit ZERO @ (((unsigned) &STATUS)*8) + 2;
2790
2791 extern volatile __bit Z_SHAD @ (((unsigned) &STATUS_SHAD)*8) + 2;
2792
2793 extern volatile __bit nBOR @ (((unsigned) &PCON)*8) + 0;
2794
2795 extern volatile __bit nDONE @ (((unsigned) &ADCON0)*8) + 1;
2796
2797 extern volatile __bit nMCLR @ (((unsigned) &PORTA)*8) + 3;
2798
2799 extern volatile __bit nPD @ (((unsigned) &STATUS)*8) + 3;
2800
2801 extern volatile __bit nPOR @ (((unsigned) &PCON)*8) + 1;
2802
2803 extern volatile __bit nRI @ (((unsigned) &PCON)*8) + 2;
2804
2805 extern volatile __bit nRMCLR @ (((unsigned) &PCON)*8) + 3;
2806
2807 extern volatile __bit nT1SYNC @ (((unsigned) &T1CON)*8) + 2;
2808
2809 extern volatile __bit nTO @ (((unsigned) &STATUS)*8) + 4;
2810
2811 extern volatile __bit nWPUEN @ (((unsigned) &OPTION_REG)*8) + 7;
2812
2813
2814 # 27 "/opt/microchip/xc8/v1.12/include/pic.h"
2815 #pragma intrinsic(_nop)
2816 extern void _nop(void);
2817
2818 # 77
2819 extern unsigned int flash_read(unsigned short addr);
2820
2821 # 41 "/opt/microchip/xc8/v1.12/include/eeprom_routines.h"
2822 extern void eeprom_write(unsigned char addr, unsigned char value);
2823 extern unsigned char eeprom_read(unsigned char addr);
2824 extern void eecpymem(volatile unsigned char *to, __eeprom unsigned char *from, unsigned char size);
2825 extern void memcpyee(__eeprom unsigned char *to, const unsigned char *from, unsigned char size);
2826
2827
2828 # 150 "/opt/microchip/xc8/v1.12/include/pic.h"
2829 #pragma intrinsic(_delay)
2830 extern void _delay(unsigned long);
2831
2832 # 8 "/opt/microchip/xc8/v1.12/include/stdio.h"
2833 typedef int ptrdiff_t;
2834 typedef unsigned size_t;
2835 typedef unsigned short wchar_t;
2836
2837 # 7 "/opt/microchip/xc8/v1.12/include/stdarg.h"
2838 typedef void * va_list[1];
2839
2840 #pragma intrinsic(__va_start)
2841 extern void * __va_start(void);
2842
2843 #pragma intrinsic(__va_arg)
2844 extern void * __va_arg(void *, ...);
2845
2846 # 23 "/opt/microchip/xc8/v1.12/include/stdio.h"
2847 extern int errno;
2848
2849 # 54
2850 struct __prbuf
2851 {
2852 char * ptr;
2853 void (* func)(char);
2854 };
2855
2856 # 17 "/opt/microchip/xc8/v1.12/include/conio.h"
2857 extern int errno;
2858
2859
2860 extern void init_uart(void);
2861
2862 extern char getch(void);
2863 extern char getche(void);
2864 extern void putch(char);
2865 extern void ungetch(char);
2866
2867 extern __bit kbhit(void);
2868
2869 # 31
2870 extern char * cgets(char *);
2871 extern void cputs(const char *);
2872
2873 # 99 "/opt/microchip/xc8/v1.12/include/stdio.h"
2874 extern int cprintf(char *, ...);
2875 #pragma printf_check(cprintf)
2876
2877
2878
2879 extern int _doprnt(struct __prbuf *, const register char *, register va_list);
2880
2881
2882 # 191
2883 #pragma printf_check(vprintf) const
2884 #pragma printf_check(vsprintf) const
2885
2886 extern char * gets(char *);
2887 extern int puts(const char *);
2888 extern int scanf(const char *, ...);
2889 extern int sscanf(const char *, const char *, ...);
2890 extern int vprintf(const char *, va_list);
2891 extern int vsprintf(char *, const char *, va_list) __attribute__((unsupported("vsprintf() is not supported by this compiler")));
2892 extern int vscanf(const char *, va_list ap);
2893 extern int vsscanf(const char *, const char *, va_list);
2894
2895 #pragma printf_check(printf) const
2896 #pragma printf_check(sprintf) const
2897 extern int sprintf(char *, const char *, ...);
2898 extern int printf(const char *, ...);
2899
2900 # 13 "/opt/microchip/xc8/v1.12/include/stdint.h"
2901 typedef signed char int8_t;
2902
2903 # 20
2904 typedef signed int int16_t;
2905
2906 # 28
2907 typedef signed short long int int24_t;
2908
2909 # 36
2910 typedef signed long int int32_t;
2911
2912 # 43
2913 typedef unsigned char uint8_t;
2914
2915 # 49
2916 typedef unsigned int uint16_t;
2917
2918 # 56
2919 typedef unsigned short long int uint24_t;
2920
2921 # 63
2922 typedef unsigned long int uint32_t;
2923
2924 # 71
2925 typedef signed char int_least8_t;
2926
2927 # 78
2928 typedef signed int int_least16_t;
2929
2930 # 90
2931 typedef signed short long int int_least24_t;
2932
2933 # 98
2934 typedef signed long int int_least32_t;
2935
2936 # 105
2937 typedef unsigned char uint_least8_t;
2938
2939 # 111
2940 typedef unsigned int uint_least16_t;
2941
2942 # 121
2943 typedef unsigned short long int uint_least24_t;
2944
2945 # 128
2946 typedef unsigned long int uint_least32_t;
2947
2948 # 137
2949 typedef signed char int_fast8_t;
2950
2951 # 144
2952 typedef signed int int_fast16_t;
2953
2954 # 156
2955 typedef signed short long int int_fast24_t;
2956
2957 # 164
2958 typedef signed long int int_fast32_t;
2959
2960 # 171
2961 typedef unsigned char uint_fast8_t;
2962
2963 # 177
2964 typedef unsigned int uint_fast16_t;
2965
2966 # 187
2967 typedef unsigned short long int uint_fast24_t;
2968
2969 # 194
2970 typedef unsigned long int uint_fast32_t;
2971
2972 # 200
2973 typedef int32_t intmax_t;
2974
2975
2976
2977
2978 typedef uint32_t uintmax_t;
2979
2980
2981
2982
2983 typedef int16_t intptr_t;
2984
2985
2986
2987
2988 typedef uint16_t uintptr_t;
2989
2990 # 12 "/opt/microchip/xc8/v1.12/include/stdbool.h"
2991 typedef unsigned char bool;
2992
2993 # 44 "/opt/microchip/xc8/v1.12/include/pic12f1840.h"
2994 extern volatile unsigned char INDF0 @ 0x000;
2995
2996 asm("INDF0 equ 00h");
2997
2998
2999 typedef union {
3000 struct {
3001 unsigned INDF0 :8;
3002 };
3003 } INDF0bits_t;
3004 extern volatile INDF0bits_t INDF0bits @ 0x000;
3005
3006 # 63
3007 extern volatile unsigned char INDF1 @ 0x001;
3008
3009 asm("INDF1 equ 01h");
3010
3011
3012 typedef union {
3013 struct {
3014 unsigned INDF1 :8;
3015 };
3016 } INDF1bits_t;
3017 extern volatile INDF1bits_t INDF1bits @ 0x001;
3018
3019 # 82
3020 extern volatile unsigned char PCL @ 0x002;
3021
3022 asm("PCL equ 02h");
3023
3024
3025 typedef union {
3026 struct {
3027 unsigned PCL :8;
3028 };
3029 } PCLbits_t;
3030 extern volatile PCLbits_t PCLbits @ 0x002;
3031
3032 # 101
3033 extern volatile unsigned char STATUS @ 0x003;
3034
3035 asm("STATUS equ 03h");
3036
3037
3038 typedef union {
3039 struct {
3040 unsigned C :1;
3041 unsigned DC :1;
3042 unsigned Z :1;
3043 unsigned nPD :1;
3044 unsigned nTO :1;
3045 };
3046 struct {
3047 unsigned CARRY :1;
3048 };
3049 struct {
3050 unsigned :2;
3051 unsigned ZERO :1;
3052 };
3053 } STATUSbits_t;
3054 extern volatile STATUSbits_t STATUSbits @ 0x003;
3055
3056 # 161
3057 extern volatile unsigned short FSR0 @ 0x004;
3058
3059
3060 extern volatile unsigned char FSR0L @ 0x004;
3061
3062 asm("FSR0L equ 04h");
3063
3064
3065 typedef union {
3066 struct {
3067 unsigned FSR0L :8;
3068 };
3069 } FSR0Lbits_t;
3070 extern volatile FSR0Lbits_t FSR0Lbits @ 0x004;
3071
3072 # 183
3073 extern volatile unsigned char FSR0H @ 0x005;
3074
3075 asm("FSR0H equ 05h");
3076
3077
3078 typedef union {
3079 struct {
3080 unsigned FSR0H :8;
3081 };
3082 } FSR0Hbits_t;
3083 extern volatile FSR0Hbits_t FSR0Hbits @ 0x005;
3084
3085 # 202
3086 extern volatile unsigned short FSR1 @ 0x006;
3087
3088
3089 extern volatile unsigned char FSR1L @ 0x006;
3090
3091 asm("FSR1L equ 06h");
3092
3093
3094 typedef union {
3095 struct {
3096 unsigned FSR1L :8;
3097 };
3098 } FSR1Lbits_t;
3099 extern volatile FSR1Lbits_t FSR1Lbits @ 0x006;
3100
3101 # 224
3102 extern volatile unsigned char FSR1H @ 0x007;
3103
3104 asm("FSR1H equ 07h");
3105
3106
3107 typedef union {
3108 struct {
3109 unsigned FSR1H :8;
3110 };
3111 } FSR1Hbits_t;
3112 extern volatile FSR1Hbits_t FSR1Hbits @ 0x007;
3113
3114 # 243
3115 extern volatile unsigned char BSR @ 0x008;
3116
3117 asm("BSR equ 08h");
3118
3119
3120 typedef union {
3121 struct {
3122 unsigned BSR0 :1;
3123 unsigned BSR1 :1;
3124 unsigned BSR2 :1;
3125 unsigned BSR3 :1;
3126 unsigned BSR4 :1;
3127 };
3128 struct {
3129 unsigned BSR :5;
3130 };
3131 } BSRbits_t;
3132 extern volatile BSRbits_t BSRbits @ 0x008;
3133
3134 # 294
3135 extern volatile unsigned char WREG @ 0x009;
3136
3137 asm("WREG equ 09h");
3138
3139
3140 typedef union {
3141 struct {
3142 unsigned WREG0 :8;
3143 };
3144 } WREGbits_t;
3145 extern volatile WREGbits_t WREGbits @ 0x009;
3146
3147 # 313
3148 extern volatile unsigned char PCLATH @ 0x00A;
3149
3150 asm("PCLATH equ 0Ah");
3151
3152
3153 typedef union {
3154 struct {
3155 unsigned PCLATH :7;
3156 };
3157 } PCLATHbits_t;
3158 extern volatile PCLATHbits_t PCLATHbits @ 0x00A;
3159
3160 # 332
3161 extern volatile unsigned char INTCON @ 0x00B;
3162
3163 asm("INTCON equ 0Bh");
3164
3165
3166 typedef union {
3167 struct {
3168 unsigned IOCIF :1;
3169 unsigned INTF :1;
3170 unsigned TMR0IF :1;
3171 unsigned IOCIE :1;
3172 unsigned INTE :1;
3173 unsigned TMR0IE :1;
3174 unsigned PEIE :1;
3175 unsigned GIE :1;
3176 };
3177 struct {
3178 unsigned :2;
3179 unsigned T0IF :1;
3180 unsigned :2;
3181 unsigned T0IE :1;
3182 };
3183 } INTCONbits_t;
3184 extern volatile INTCONbits_t INTCONbits @ 0x00B;
3185
3186 # 409
3187 extern volatile unsigned char PORTA @ 0x00C;
3188
3189 asm("PORTA equ 0Ch");
3190
3191
3192 typedef union {
3193 struct {
3194 unsigned RA0 :1;
3195 unsigned RA1 :1;
3196 unsigned RA2 :1;
3197 unsigned RA3 :1;
3198 unsigned RA4 :1;
3199 unsigned RA5 :1;
3200 };
3201 } PORTAbits_t;
3202 extern volatile PORTAbits_t PORTAbits @ 0x00C;
3203
3204 # 458
3205 extern volatile unsigned char PIR1 @ 0x011;
3206
3207 asm("PIR1 equ 011h");
3208
3209
3210 typedef union {
3211 struct {
3212 unsigned TMR1IF :1;
3213 unsigned TMR2IF :1;
3214 unsigned CCP1IF :1;
3215 unsigned SSP1IF :1;
3216 unsigned TXIF :1;
3217 unsigned RCIF :1;
3218 unsigned ADIF :1;
3219 unsigned TMR1GIF :1;
3220 };
3221 } PIR1bits_t;
3222 extern volatile PIR1bits_t PIR1bits @ 0x011;
3223
3224 # 519
3225 extern volatile unsigned char PIR2 @ 0x012;
3226
3227 asm("PIR2 equ 012h");
3228
3229
3230 typedef union {
3231 struct {
3232 unsigned :3;
3233 unsigned BCL1IF :1;
3234 unsigned EEIF :1;
3235 unsigned C1IF :1;
3236 unsigned :1;
3237 unsigned OSFIF :1;
3238 };
3239 } PIR2bits_t;
3240 extern volatile PIR2bits_t PIR2bits @ 0x012;
3241
3242 # 558
3243 extern volatile unsigned char TMR0 @ 0x015;
3244
3245 asm("TMR0 equ 015h");
3246
3247
3248 typedef union {
3249 struct {
3250 unsigned TMR0 :8;
3251 };
3252 } TMR0bits_t;
3253 extern volatile TMR0bits_t TMR0bits @ 0x015;
3254
3255 # 577
3256 extern volatile unsigned short TMR1 @ 0x016;
3257
3258 asm("TMR1 equ 016h");
3259
3260
3261
3262 extern volatile unsigned char TMR1L @ 0x016;
3263
3264 asm("TMR1L equ 016h");
3265
3266
3267 typedef union {
3268 struct {
3269 unsigned TMR1L :8;
3270 };
3271 } TMR1Lbits_t;
3272 extern volatile TMR1Lbits_t TMR1Lbits @ 0x016;
3273
3274 # 602
3275 extern volatile unsigned char TMR1H @ 0x017;
3276
3277 asm("TMR1H equ 017h");
3278
3279
3280 typedef union {
3281 struct {
3282 unsigned TMR1H :8;
3283 };
3284 } TMR1Hbits_t;
3285 extern volatile TMR1Hbits_t TMR1Hbits @ 0x017;
3286
3287 # 621
3288 extern volatile unsigned char T1CON @ 0x018;
3289
3290 asm("T1CON equ 018h");
3291
3292
3293 typedef union {
3294 struct {
3295 unsigned TMR1ON :1;
3296 unsigned :1;
3297 unsigned nT1SYNC :1;
3298 unsigned T1OSCEN :1;
3299 unsigned T1CKPS0 :1;
3300 unsigned T1CKPS1 :1;
3301 unsigned TMR1CS0 :1;
3302 unsigned TMR1CS1 :1;
3303 };
3304 struct {
3305 unsigned :4;
3306 unsigned T1CKPS :2;
3307 unsigned TMR1CS :2;
3308 };
3309 } T1CONbits_t;
3310 extern volatile T1CONbits_t T1CONbits @ 0x018;
3311
3312 # 692
3313 extern volatile unsigned char T1GCON @ 0x019;
3314
3315 asm("T1GCON equ 019h");
3316
3317
3318 typedef union {
3319 struct {
3320 unsigned T1GSS0 :1;
3321 unsigned T1GSS1 :1;
3322 unsigned T1GVAL :1;
3323 unsigned T1GGO_nDONE :1;
3324 unsigned T1GSPM :1;
3325 unsigned T1GTM :1;
3326 unsigned T1GPOL :1;
3327 unsigned TMR1GE :1;
3328 };
3329 struct {
3330 unsigned T1GSS :2;
3331 unsigned :1;
3332 unsigned T1GGO :1;
3333 };
3334 } T1GCONbits_t;
3335 extern volatile T1GCONbits_t T1GCONbits @ 0x019;
3336
3337 # 768
3338 extern volatile unsigned char TMR2 @ 0x01A;
3339
3340 asm("TMR2 equ 01Ah");
3341
3342
3343 typedef union {
3344 struct {
3345 unsigned TMR2 :8;
3346 };
3347 } TMR2bits_t;
3348 extern volatile TMR2bits_t TMR2bits @ 0x01A;
3349
3350 # 787
3351 extern volatile unsigned char PR2 @ 0x01B;
3352
3353 asm("PR2 equ 01Bh");
3354
3355
3356 typedef union {
3357 struct {
3358 unsigned PR2 :8;
3359 };
3360 } PR2bits_t;
3361 extern volatile PR2bits_t PR2bits @ 0x01B;
3362
3363 # 806
3364 extern volatile unsigned char T2CON @ 0x01C;
3365
3366 asm("T2CON equ 01Ch");
3367
3368
3369 typedef union {
3370 struct {
3371 unsigned T2CKPS0 :1;
3372 unsigned T2CKPS1 :1;
3373 unsigned TMR2ON :1;
3374 unsigned T2OUTPS0 :1;
3375 unsigned T2OUTPS1 :1;
3376 unsigned T2OUTPS2 :1;
3377 unsigned T2OUTPS3 :1;
3378 };
3379 struct {
3380 unsigned T2CKPS :2;
3381 unsigned :1;
3382 unsigned T2OUTPS :4;
3383 };
3384 } T2CONbits_t;
3385 extern volatile T2CONbits_t T2CONbits @ 0x01C;
3386
3387 # 876
3388 extern volatile unsigned char CPSCON0 @ 0x01E;
3389
3390 asm("CPSCON0 equ 01Eh");
3391
3392
3393 typedef union {
3394 struct {
3395 unsigned T0XCS :1;
3396 unsigned CPSOUT :1;
3397 unsigned CPSRNG0 :1;
3398 unsigned CPSRNG1 :1;
3399 unsigned :2;
3400 unsigned CPSRM :1;
3401 unsigned CPSON :1;
3402 };
3403 struct {
3404 unsigned :2;
3405 unsigned CPSRNG :2;
3406 };
3407 } CPSCON0bits_t;
3408 extern volatile CPSCON0bits_t CPSCON0bits @ 0x01E;
3409
3410 # 935
3411 extern volatile unsigned char CPSCON1 @ 0x01F;
3412
3413 asm("CPSCON1 equ 01Fh");
3414
3415
3416 typedef union {
3417 struct {
3418 unsigned CPSCH0 :1;
3419 unsigned CPSCH1 :1;
3420 };
3421 struct {
3422 unsigned CPSCH :2;
3423 };
3424 } CPSCON1bits_t;
3425 extern volatile CPSCON1bits_t CPSCON1bits @ 0x01F;
3426
3427 # 968
3428 extern volatile unsigned char TRISA @ 0x08C;
3429
3430 asm("TRISA equ 08Ch");
3431
3432
3433 typedef union {
3434 struct {
3435 unsigned TRISA0 :1;
3436 unsigned TRISA1 :1;
3437 unsigned TRISA2 :1;
3438 unsigned TRISA3 :1;
3439 unsigned TRISA4 :1;
3440 unsigned TRISA5 :1;
3441 };
3442 } TRISAbits_t;
3443 extern volatile TRISAbits_t TRISAbits @ 0x08C;
3444
3445 # 1017
3446 extern volatile unsigned char PIE1 @ 0x091;
3447
3448 asm("PIE1 equ 091h");
3449
3450
3451 typedef union {
3452 struct {
3453 unsigned TMR1IE :1;
3454 unsigned TMR2IE :1;
3455 unsigned CCP1IE :1;
3456 unsigned SSP1IE :1;
3457 unsigned TXIE :1;
3458 unsigned RCIE :1;
3459 unsigned ADIE :1;
3460 unsigned TMR1GIE :1;
3461 };
3462 } PIE1bits_t;
3463 extern volatile PIE1bits_t PIE1bits @ 0x091;
3464
3465 # 1078
3466 extern volatile unsigned char PIE2 @ 0x092;
3467
3468 asm("PIE2 equ 092h");
3469
3470
3471 typedef union {
3472 struct {
3473 unsigned :3;
3474 unsigned BCL1IE :1;
3475 unsigned EEIE :1;
3476 unsigned C1IE :1;
3477 unsigned :1;
3478 unsigned OSFIE :1;
3479 };
3480 } PIE2bits_t;
3481 extern volatile PIE2bits_t PIE2bits @ 0x092;
3482
3483 # 1117
3484 extern volatile unsigned char OPTION_REG @ 0x095;
3485
3486 asm("OPTION_REG equ 095h");
3487
3488
3489 typedef union {
3490 struct {
3491 unsigned PS0 :1;
3492 unsigned PS1 :1;
3493 unsigned PS2 :1;
3494 unsigned PSA :1;
3495 unsigned TMR0SE :1;
3496 unsigned TMR0CS :1;
3497 unsigned INTEDG :1;
3498 unsigned nWPUEN :1;
3499 };
3500 struct {
3501 unsigned PS :3;
3502 unsigned :1;
3503 unsigned T0SE :1;
3504 unsigned T0CS :1;
3505 };
3506 } OPTION_REGbits_t;
3507 extern volatile OPTION_REGbits_t OPTION_REGbits @ 0x095;
3508
3509 # 1199
3510 extern volatile unsigned char PCON @ 0x096;
3511
3512 asm("PCON equ 096h");
3513
3514
3515 typedef union {
3516 struct {
3517 unsigned nBOR :1;
3518 unsigned nPOR :1;
3519 unsigned nRI :1;
3520 unsigned nRMCLR :1;
3521 unsigned :2;
3522 unsigned STKUNF :1;
3523 unsigned STKOVF :1;
3524 };
3525 } PCONbits_t;
3526 extern volatile PCONbits_t PCONbits @ 0x096;
3527
3528 # 1249
3529 extern volatile unsigned char WDTCON @ 0x097;
3530
3531 asm("WDTCON equ 097h");
3532
3533
3534 typedef union {
3535 struct {
3536 unsigned SWDTEN :1;
3537 unsigned WDTPS0 :1;
3538 unsigned WDTPS1 :1;
3539 unsigned WDTPS2 :1;
3540 unsigned WDTPS3 :1;
3541 unsigned WDTPS4 :1;
3542 };
3543 struct {
3544 unsigned :1;
3545 unsigned WDTPS :5;
3546 };
3547 } WDTCONbits_t;
3548 extern volatile WDTCONbits_t WDTCONbits @ 0x097;
3549
3550 # 1307
3551 extern volatile unsigned char OSCTUNE @ 0x098;
3552
3553 asm("OSCTUNE equ 098h");
3554
3555
3556 typedef union {
3557 struct {
3558 unsigned TUN0 :1;
3559 unsigned TUN1 :1;
3560 unsigned TUN2 :1;
3561 unsigned TUN3 :1;
3562 unsigned TUN4 :1;
3563 unsigned TUN5 :1;
3564 };
3565 struct {
3566 unsigned TUN :6;
3567 };
3568 } OSCTUNEbits_t;
3569 extern volatile OSCTUNEbits_t OSCTUNEbits @ 0x098;
3570
3571 # 1364
3572 extern volatile unsigned char OSCCON @ 0x099;
3573
3574 asm("OSCCON equ 099h");
3575
3576
3577 typedef union {
3578 struct {
3579 unsigned SCS0 :1;
3580 unsigned SCS1 :1;
3581 unsigned :1;
3582 unsigned IRCF0 :1;
3583 unsigned IRCF1 :1;
3584 unsigned IRCF2 :1;
3585 unsigned IRCF3 :1;
3586 unsigned SPLLEN :1;
3587 };
3588 struct {
3589 unsigned SCS :2;
3590 unsigned :1;
3591 unsigned IRCF :4;
3592 };
3593 } OSCCONbits_t;
3594 extern volatile OSCCONbits_t OSCCONbits @ 0x099;
3595
3596 # 1435
3597 extern volatile unsigned char OSCSTAT @ 0x09A;
3598
3599 asm("OSCSTAT equ 09Ah");
3600
3601
3602 typedef union {
3603 struct {
3604 unsigned HFIOFS :1;
3605 unsigned LFIOFR :1;
3606 unsigned MFIOFR :1;
3607 unsigned HFIOFL :1;
3608 unsigned HFIOFR :1;
3609 unsigned OSTS :1;
3610 unsigned PLLR :1;
3611 unsigned T1OSCR :1;
3612 };
3613 } OSCSTATbits_t;
3614 extern volatile OSCSTATbits_t OSCSTATbits @ 0x09A;
3615
3616 # 1496
3617 extern volatile unsigned short ADRES @ 0x09B;
3618
3619 asm("ADRES equ 09Bh");
3620
3621
3622
3623 extern volatile unsigned char ADRESL @ 0x09B;
3624
3625 asm("ADRESL equ 09Bh");
3626
3627
3628 typedef union {
3629 struct {
3630 unsigned ADRESL :8;
3631 };
3632 } ADRESLbits_t;
3633 extern volatile ADRESLbits_t ADRESLbits @ 0x09B;
3634
3635 # 1521
3636 extern volatile unsigned char ADRESH @ 0x09C;
3637
3638 asm("ADRESH equ 09Ch");
3639
3640
3641 typedef union {
3642 struct {
3643 unsigned ADRESH :8;
3644 };
3645 } ADRESHbits_t;
3646 extern volatile ADRESHbits_t ADRESHbits @ 0x09C;
3647
3648 # 1540
3649 extern volatile unsigned char ADCON0 @ 0x09D;
3650
3651 asm("ADCON0 equ 09Dh");
3652
3653
3654 typedef union {
3655 struct {
3656 unsigned ADON :1;
3657 unsigned GO_nDONE :1;
3658 unsigned CHS0 :1;
3659 unsigned CHS1 :1;
3660 unsigned CHS2 :1;
3661 unsigned CHS3 :1;
3662 unsigned CHS4 :1;
3663 };
3664 struct {
3665 unsigned :1;
3666 unsigned ADGO :1;
3667 unsigned CHS :5;
3668 };
3669 struct {
3670 unsigned :1;
3671 unsigned GO :1;
3672 };
3673 } ADCON0bits_t;
3674 extern volatile ADCON0bits_t ADCON0bits @ 0x09D;
3675
3676 # 1619
3677 extern volatile unsigned char ADCON1 @ 0x09E;
3678
3679 asm("ADCON1 equ 09Eh");
3680
3681
3682 typedef union {
3683 struct {
3684 unsigned ADPREF0 :1;
3685 unsigned ADPREF1 :1;
3686 unsigned :2;
3687 unsigned ADCS0 :1;
3688 unsigned ADCS1 :1;
3689 unsigned ADCS2 :1;
3690 unsigned ADFM :1;
3691 };
3692 struct {
3693 unsigned ADPREF :2;
3694 unsigned :2;
3695 unsigned ADCS :3;
3696 };
3697 } ADCON1bits_t;
3698 extern volatile ADCON1bits_t ADCON1bits @ 0x09E;
3699
3700 # 1684
3701 extern volatile unsigned char LATA @ 0x10C;
3702
3703 asm("LATA equ 010Ch");
3704
3705
3706 typedef union {
3707 struct {
3708 unsigned LATA0 :1;
3709 unsigned LATA1 :1;
3710 unsigned LATA2 :1;
3711 unsigned :1;
3712 unsigned LATA4 :1;
3713 unsigned LATA5 :1;
3714 };
3715 } LATAbits_t;
3716 extern volatile LATAbits_t LATAbits @ 0x10C;
3717
3718 # 1728
3719 extern volatile unsigned char CM1CON0 @ 0x111;
3720
3721 asm("CM1CON0 equ 0111h");
3722
3723
3724 typedef union {
3725 struct {
3726 unsigned C1SYNC :1;
3727 unsigned C1HYS :1;
3728 unsigned C1SP :1;
3729 unsigned :1;
3730 unsigned C1POL :1;
3731 unsigned C1OE :1;
3732 unsigned C1OUT :1;
3733 unsigned C1ON :1;
3734 };
3735 } CM1CON0bits_t;
3736 extern volatile CM1CON0bits_t CM1CON0bits @ 0x111;
3737
3738 # 1784
3739 extern volatile unsigned char CM1CON1 @ 0x112;
3740
3741 asm("CM1CON1 equ 0112h");
3742
3743
3744 typedef union {
3745 struct {
3746 unsigned C1NCH :1;
3747 unsigned :3;
3748 unsigned C1PCH0 :1;
3749 unsigned C1PCH1 :1;
3750 unsigned C1INTN :1;
3751 unsigned C1INTP :1;
3752 };
3753 struct {
3754 unsigned C1NCH0 :1;
3755 unsigned :3;
3756 unsigned C1PCH :2;
3757 };
3758 } CM1CON1bits_t;
3759 extern volatile CM1CON1bits_t CM1CON1bits @ 0x112;
3760
3761 # 1843
3762 extern volatile unsigned char CMOUT @ 0x115;
3763
3764 asm("CMOUT equ 0115h");
3765
3766
3767 typedef union {
3768 struct {
3769 unsigned MC1OUT :1;
3770 };
3771 } CMOUTbits_t;
3772 extern volatile CMOUTbits_t CMOUTbits @ 0x115;
3773
3774 # 1862
3775 extern volatile unsigned char BORCON @ 0x116;
3776
3777 asm("BORCON equ 0116h");
3778
3779
3780 typedef union {
3781 struct {
3782 unsigned BORRDY :1;
3783 unsigned :5;
3784 unsigned BORFS :1;
3785 unsigned SBOREN :1;
3786 };
3787 } BORCONbits_t;
3788 extern volatile BORCONbits_t BORCONbits @ 0x116;
3789
3790 # 1894
3791 extern volatile unsigned char FVRCON @ 0x117;
3792
3793 asm("FVRCON equ 0117h");
3794
3795
3796 typedef union {
3797 struct {
3798 unsigned ADFVR0 :1;
3799 unsigned ADFVR1 :1;
3800 unsigned CDAFVR0 :1;
3801 unsigned CDAFVR1 :1;
3802 unsigned TSRNG :1;
3803 unsigned TSEN :1;
3804 unsigned FVRRDY :1;
3805 unsigned FVREN :1;
3806 };
3807 struct {
3808 unsigned ADFVR :2;
3809 unsigned CDAFVR :2;
3810 };
3811 } FVRCONbits_t;
3812 extern volatile FVRCONbits_t FVRCONbits @ 0x117;
3813
3814 # 1969
3815 extern volatile unsigned char DACCON0 @ 0x118;
3816
3817 asm("DACCON0 equ 0118h");
3818
3819
3820 typedef union {
3821 struct {
3822 unsigned :2;
3823 unsigned DACPSS0 :1;
3824 unsigned DACPSS1 :1;
3825 unsigned :1;
3826 unsigned DACOE :1;
3827 unsigned DACLPS :1;
3828 unsigned DACEN :1;
3829 };
3830 struct {
3831 unsigned :2;
3832 unsigned DACPSS :2;
3833 };
3834 } DACCON0bits_t;
3835 extern volatile DACCON0bits_t DACCON0bits @ 0x118;
3836
3837 # 2023
3838 extern volatile unsigned char DACCON1 @ 0x119;
3839
3840 asm("DACCON1 equ 0119h");
3841
3842
3843 typedef union {
3844 struct {
3845 unsigned DACR0 :1;
3846 unsigned DACR1 :1;
3847 unsigned DACR2 :1;
3848 unsigned DACR3 :1;
3849 unsigned DACR4 :1;
3850 };
3851 struct {
3852 unsigned DACR :5;
3853 };
3854 } DACCON1bits_t;
3855 extern volatile DACCON1bits_t DACCON1bits @ 0x119;
3856
3857 # 2074
3858 extern volatile unsigned char SRCON0 @ 0x11A;
3859
3860 asm("SRCON0 equ 011Ah");
3861
3862
3863 typedef union {
3864 struct {
3865 unsigned SRPR :1;
3866 unsigned SRPS :1;
3867 unsigned SRNQEN :1;
3868 unsigned SRQEN :1;
3869 unsigned SRCLK0 :1;
3870 unsigned SRCLK1 :1;
3871 unsigned SRCLK2 :1;
3872 unsigned SRLEN :1;
3873 };
3874 struct {
3875 unsigned :4;
3876 unsigned SRCLK :3;
3877 };
3878 } SRCON0bits_t;
3879 extern volatile SRCON0bits_t SRCON0bits @ 0x11A;
3880
3881 # 2144
3882 extern volatile unsigned char SRCON1 @ 0x11B;
3883
3884 asm("SRCON1 equ 011Bh");
3885
3886
3887 typedef union {
3888 struct {
3889 unsigned SRRC1E :1;
3890 unsigned :1;
3891 unsigned SRRCKE :1;
3892 unsigned SRRPE :1;
3893 unsigned SRSC1E :1;
3894 unsigned :1;
3895 unsigned SRSCKE :1;
3896 unsigned SRSPE :1;
3897 };
3898 } SRCON1bits_t;
3899 extern volatile SRCON1bits_t SRCON1bits @ 0x11B;
3900
3901 # 2195
3902 extern volatile unsigned char APFCON @ 0x11D;
3903
3904 asm("APFCON equ 011Dh");
3905
3906
3907 extern volatile unsigned char APFCON0 @ 0x11D;
3908
3909 asm("APFCON0 equ 011Dh");
3910
3911
3912 typedef union {
3913 struct {
3914 unsigned CCP1SEL :1;
3915 unsigned P1BSEL :1;
3916 unsigned TXCKSEL :1;
3917 unsigned T1GSEL :1;
3918 unsigned :1;
3919 unsigned SSSEL :1;
3920 unsigned SDOSEL :1;
3921 unsigned RXDTSEL :1;
3922 };
3923 struct {
3924 unsigned :5;
3925 unsigned SS1SEL :1;
3926 unsigned SDO1SEL :1;
3927 };
3928 } APFCONbits_t;
3929 extern volatile APFCONbits_t APFCONbits @ 0x11D;
3930
3931 # 2270
3932 typedef union {
3933 struct {
3934 unsigned CCP1SEL :1;
3935 unsigned P1BSEL :1;
3936 unsigned TXCKSEL :1;
3937 unsigned T1GSEL :1;
3938 unsigned :1;
3939 unsigned SSSEL :1;
3940 unsigned SDOSEL :1;
3941 unsigned RXDTSEL :1;
3942 };
3943 struct {
3944 unsigned :5;
3945 unsigned SS1SEL :1;
3946 unsigned SDO1SEL :1;
3947 };
3948 } APFCON0bits_t;
3949 extern volatile APFCON0bits_t APFCON0bits @ 0x11D;
3950
3951 # 2336
3952 extern volatile unsigned char ANSELA @ 0x18C;
3953
3954 asm("ANSELA equ 018Ch");
3955
3956
3957 typedef union {
3958 struct {
3959 unsigned ANSA0 :1;
3960 unsigned ANSA1 :1;
3961 unsigned ANSA2 :1;
3962 unsigned :1;
3963 unsigned ANSA4 :1;
3964 };
3965 struct {
3966 unsigned ANSELA :5;
3967 };
3968 } ANSELAbits_t;
3969 extern volatile ANSELAbits_t ANSELAbits @ 0x18C;
3970
3971 # 2382
3972 extern volatile unsigned short EEADR @ 0x191;
3973
3974 asm("EEADR equ 0191h");
3975
3976
3977
3978 extern volatile unsigned char EEADRL @ 0x191;
3979
3980 asm("EEADRL equ 0191h");
3981
3982
3983 typedef union {
3984 struct {
3985 unsigned EEADRL :8;
3986 };
3987 } EEADRLbits_t;
3988 extern volatile EEADRLbits_t EEADRLbits @ 0x191;
3989
3990 # 2407
3991 extern volatile unsigned char EEADRH @ 0x192;
3992
3993 asm("EEADRH equ 0192h");
3994
3995
3996 typedef union {
3997 struct {
3998 unsigned EEADRH :7;
3999 };
4000 } EEADRHbits_t;
4001 extern volatile EEADRHbits_t EEADRHbits @ 0x192;
4002
4003 # 2426
4004 extern volatile unsigned short EEDAT @ 0x193;
4005
4006 asm("EEDAT equ 0193h");
4007
4008
4009
4010 extern volatile unsigned char EEDATL @ 0x193;
4011
4012 asm("EEDATL equ 0193h");
4013
4014
4015 extern volatile unsigned char EEDATA @ 0x193;
4016
4017 asm("EEDATA equ 0193h");
4018
4019
4020 typedef union {
4021 struct {
4022 unsigned EEDATL :8;
4023 };
4024 } EEDATLbits_t;
4025 extern volatile EEDATLbits_t EEDATLbits @ 0x193;
4026
4027 # 2455
4028 typedef union {
4029 struct {
4030 unsigned EEDATL :8;
4031 };
4032 } EEDATAbits_t;
4033 extern volatile EEDATAbits_t EEDATAbits @ 0x193;
4034
4035 # 2469
4036 extern volatile unsigned char EEDATH @ 0x194;
4037
4038 asm("EEDATH equ 0194h");
4039
4040
4041 typedef union {
4042 struct {
4043 unsigned EEDATH :6;
4044 };
4045 } EEDATHbits_t;
4046 extern volatile EEDATHbits_t EEDATHbits @ 0x194;
4047
4048 # 2488
4049 extern volatile unsigned char EECON1 @ 0x195;
4050
4051 asm("EECON1 equ 0195h");
4052
4053
4054 typedef union {
4055 struct {
4056 unsigned RD :1;
4057 unsigned WR :1;
4058 unsigned WREN :1;
4059 unsigned WRERR :1;
4060 unsigned FREE :1;
4061 unsigned LWLO :1;
4062 unsigned CFGS :1;
4063 unsigned EEPGD :1;
4064 };
4065 } EECON1bits_t;
4066 extern volatile EECON1bits_t EECON1bits @ 0x195;
4067
4068 # 2549
4069 extern volatile unsigned char EECON2 @ 0x196;
4070
4071 asm("EECON2 equ 0196h");
4072
4073
4074 typedef union {
4075 struct {
4076 unsigned EECON2 :8;
4077 };
4078 } EECON2bits_t;
4079 extern volatile EECON2bits_t EECON2bits @ 0x196;
4080
4081 # 2568
4082 extern volatile unsigned char VREGCON @ 0x197;
4083
4084 asm("VREGCON equ 0197h");
4085
4086
4087 typedef union {
4088 struct {
4089 unsigned VREGPM0 :1;
4090 unsigned VREGPM1 :1;
4091 };
4092 struct {
4093 unsigned VREGPM :2;
4094 };
4095 } VREGCONbits_t;
4096 extern volatile VREGCONbits_t VREGCONbits @ 0x197;
4097
4098 # 2601
4099 extern volatile unsigned char RCREG @ 0x199;
4100
4101 asm("RCREG equ 0199h");
4102
4103
4104 typedef union {
4105 struct {
4106 unsigned RCREG :8;
4107 };
4108 } RCREGbits_t;
4109 extern volatile RCREGbits_t RCREGbits @ 0x199;
4110
4111 # 2620
4112 extern volatile unsigned char TXREG @ 0x19A;
4113
4114 asm("TXREG equ 019Ah");
4115
4116
4117 typedef union {
4118 struct {
4119 unsigned TXREG :8;
4120 };
4121 } TXREGbits_t;
4122 extern volatile TXREGbits_t TXREGbits @ 0x19A;
4123
4124 # 2639
4125 extern volatile unsigned char SPBRGL @ 0x19B;
4126
4127 asm("SPBRGL equ 019Bh");
4128
4129
4130 extern volatile unsigned char SPBRG @ 0x19B;
4131
4132 asm("SPBRG equ 019Bh");
4133
4134
4135 typedef union {
4136 struct {
4137 unsigned SPBRGL :8;
4138 };
4139 } SPBRGLbits_t;
4140 extern volatile SPBRGLbits_t SPBRGLbits @ 0x19B;
4141
4142 # 2662
4143 typedef union {
4144 struct {
4145 unsigned SPBRGL :8;
4146 };
4147 } SPBRGbits_t;
4148 extern volatile SPBRGbits_t SPBRGbits @ 0x19B;
4149
4150 # 2676
4151 extern volatile unsigned char SPBRGH @ 0x19C;
4152
4153 asm("SPBRGH equ 019Ch");
4154
4155
4156 typedef union {
4157 struct {
4158 unsigned SPBRGH :8;
4159 };
4160 } SPBRGHbits_t;
4161 extern volatile SPBRGHbits_t SPBRGHbits @ 0x19C;
4162
4163 # 2695
4164 extern volatile unsigned char RCSTA @ 0x19D;
4165
4166 asm("RCSTA equ 019Dh");
4167
4168
4169 typedef union {
4170 struct {
4171 unsigned RX9D :1;
4172 unsigned OERR :1;
4173 unsigned FERR :1;
4174 unsigned ADDEN :1;
4175 unsigned CREN :1;
4176 unsigned SREN :1;
4177 unsigned RX9 :1;
4178 unsigned SPEN :1;
4179 };
4180 } RCSTAbits_t;
4181 extern volatile RCSTAbits_t RCSTAbits @ 0x19D;
4182
4183 # 2756
4184 extern volatile unsigned char TXSTA @ 0x19E;
4185
4186 asm("TXSTA equ 019Eh");
4187
4188
4189 typedef union {
4190 struct {
4191 unsigned TX9D :1;
4192 unsigned TRMT :1;
4193 unsigned BRGH :1;
4194 unsigned SENDB :1;
4195 unsigned SYNC :1;
4196 unsigned TXEN :1;
4197 unsigned TX9 :1;
4198 unsigned CSRC :1;
4199 };
4200 } TXSTAbits_t;
4201 extern volatile TXSTAbits_t TXSTAbits @ 0x19E;
4202
4203 # 2817
4204 extern volatile unsigned char BAUDCON @ 0x19F;
4205
4206 asm("BAUDCON equ 019Fh");
4207
4208
4209 typedef union {
4210 struct {
4211 unsigned ABDEN :1;
4212 unsigned WUE :1;
4213 unsigned :1;
4214 unsigned BRG16 :1;
4215 unsigned SCKP :1;
4216 unsigned :1;
4217 unsigned RCIDL :1;
4218 unsigned ABDOVF :1;
4219 };
4220 } BAUDCONbits_t;
4221 extern volatile BAUDCONbits_t BAUDCONbits @ 0x19F;
4222
4223 # 2868
4224 extern volatile unsigned char WPUA @ 0x20C;
4225
4226 asm("WPUA equ 020Ch");
4227
4228
4229 typedef union {
4230 struct {
4231 unsigned WPUA0 :1;
4232 unsigned WPUA1 :1;
4233 unsigned WPUA2 :1;
4234 unsigned WPUA3 :1;
4235 unsigned WPUA4 :1;
4236 unsigned WPUA5 :1;
4237 };
4238 struct {
4239 unsigned WPUA :6;
4240 };
4241 } WPUAbits_t;
4242 extern volatile WPUAbits_t WPUAbits @ 0x20C;
4243
4244 # 2925
4245 extern volatile unsigned char SSP1BUF @ 0x211;
4246
4247 asm("SSP1BUF equ 0211h");
4248
4249
4250 extern volatile unsigned char SSPBUF @ 0x211;
4251
4252 asm("SSPBUF equ 0211h");
4253
4254
4255 typedef union {
4256 struct {
4257 unsigned SSPBUF :8;
4258 };
4259 } SSP1BUFbits_t;
4260 extern volatile SSP1BUFbits_t SSP1BUFbits @ 0x211;
4261
4262 # 2948
4263 typedef union {
4264 struct {
4265 unsigned SSPBUF :8;
4266 };
4267 } SSPBUFbits_t;
4268 extern volatile SSPBUFbits_t SSPBUFbits @ 0x211;
4269
4270 # 2962
4271 extern volatile unsigned char SSP1ADD @ 0x212;
4272
4273 asm("SSP1ADD equ 0212h");
4274
4275
4276 extern volatile unsigned char SSPADD @ 0x212;
4277
4278 asm("SSPADD equ 0212h");
4279
4280
4281 typedef union {
4282 struct {
4283 unsigned SSPADD :8;
4284 };
4285 } SSP1ADDbits_t;
4286 extern volatile SSP1ADDbits_t SSP1ADDbits @ 0x212;
4287
4288 # 2985
4289 typedef union {
4290 struct {
4291 unsigned SSPADD :8;
4292 };
4293 } SSPADDbits_t;
4294 extern volatile SSPADDbits_t SSPADDbits @ 0x212;
4295
4296 # 2999
4297 extern volatile unsigned char SSP1MSK @ 0x213;
4298
4299 asm("SSP1MSK equ 0213h");
4300
4301
4302 extern volatile unsigned char SSPMSK @ 0x213;
4303
4304 asm("SSPMSK equ 0213h");
4305
4306
4307 typedef union {
4308 struct {
4309 unsigned SSPMSK :8;
4310 };
4311 } SSP1MSKbits_t;
4312 extern volatile SSP1MSKbits_t SSP1MSKbits @ 0x213;
4313
4314 # 3022
4315 typedef union {
4316 struct {
4317 unsigned SSPMSK :8;
4318 };
4319 } SSPMSKbits_t;
4320 extern volatile SSPMSKbits_t SSPMSKbits @ 0x213;
4321
4322 # 3036
4323 extern volatile unsigned char SSP1STAT @ 0x214;
4324
4325 asm("SSP1STAT equ 0214h");
4326
4327
4328 extern volatile unsigned char SSPSTAT @ 0x214;
4329
4330 asm("SSPSTAT equ 0214h");
4331
4332
4333 typedef union {
4334 struct {
4335 unsigned BF :1;
4336 unsigned UA :1;
4337 unsigned R_nW :1;
4338 unsigned S :1;
4339 unsigned P :1;
4340 unsigned D_nA :1;
4341 unsigned CKE :1;
4342 unsigned SMP :1;
4343 };
4344 } SSP1STATbits_t;
4345 extern volatile SSP1STATbits_t SSP1STATbits @ 0x214;
4346
4347 # 3101
4348 typedef union {
4349 struct {
4350 unsigned BF :1;
4351 unsigned UA :1;
4352 unsigned R_nW :1;
4353 unsigned S :1;
4354 unsigned P :1;
4355 unsigned D_nA :1;
4356 unsigned CKE :1;
4357 unsigned SMP :1;
4358 };
4359 } SSPSTATbits_t;
4360 extern volatile SSPSTATbits_t SSPSTATbits @ 0x214;
4361
4362 # 3157
4363 extern volatile unsigned char SSP1CON1 @ 0x215;
4364
4365 asm("SSP1CON1 equ 0215h");
4366
4367
4368 extern volatile unsigned char SSPCON1 @ 0x215;
4369
4370 asm("SSPCON1 equ 0215h");
4371
4372 extern volatile unsigned char SSPCON @ 0x215;
4373
4374 asm("SSPCON equ 0215h");
4375
4376
4377 typedef union {
4378 struct {
4379 unsigned SSPM0 :1;
4380 unsigned SSPM1 :1;
4381 unsigned SSPM2 :1;
4382 unsigned SSPM3 :1;
4383 unsigned CKP :1;
4384 unsigned SSPEN :1;
4385 unsigned SSPOV :1;
4386 unsigned WCOL :1;
4387 };
4388 struct {
4389 unsigned SSPM :4;
4390 };
4391 } SSP1CON1bits_t;
4392 extern volatile SSP1CON1bits_t SSP1CON1bits @ 0x215;
4393
4394 # 3234
4395 typedef union {
4396 struct {
4397 unsigned SSPM0 :1;
4398 unsigned SSPM1 :1;
4399 unsigned SSPM2 :1;
4400 unsigned SSPM3 :1;
4401 unsigned CKP :1;
4402 unsigned SSPEN :1;
4403 unsigned SSPOV :1;
4404 unsigned WCOL :1;
4405 };
4406 struct {
4407 unsigned SSPM :4;
4408 };
4409 } SSPCON1bits_t;
4410 extern volatile SSPCON1bits_t SSPCON1bits @ 0x215;
4411
4412 # 3296
4413 typedef union {
4414 struct {
4415 unsigned SSPM0 :1;
4416 unsigned SSPM1 :1;
4417 unsigned SSPM2 :1;
4418 unsigned SSPM3 :1;
4419 unsigned CKP :1;
4420 unsigned SSPEN :1;
4421 unsigned SSPOV :1;
4422 unsigned WCOL :1;
4423 };
4424 struct {
4425 unsigned SSPM :4;
4426 };
4427 } SSPCONbits_t;
4428 extern volatile SSPCONbits_t SSPCONbits @ 0x215;
4429
4430 # 3360
4431 extern volatile unsigned char SSP1CON2 @ 0x216;
4432
4433 asm("SSP1CON2 equ 0216h");
4434
4435
4436 extern volatile unsigned char SSPCON2 @ 0x216;
4437
4438 asm("SSPCON2 equ 0216h");
4439
4440
4441 typedef union {
4442 struct {
4443 unsigned SEN :1;
4444 unsigned RSEN :1;
4445 unsigned PEN :1;
4446 unsigned RCEN :1;
4447 unsigned ACKEN :1;
4448 unsigned ACKDT :1;
4449 unsigned ACKSTAT :1;
4450 unsigned GCEN :1;
4451 };
4452 } SSP1CON2bits_t;
4453 extern volatile SSP1CON2bits_t SSP1CON2bits @ 0x216;
4454
4455 # 3425
4456 typedef union {
4457 struct {
4458 unsigned SEN :1;
4459 unsigned RSEN :1;
4460 unsigned PEN :1;
4461 unsigned RCEN :1;
4462 unsigned ACKEN :1;
4463 unsigned ACKDT :1;
4464 unsigned ACKSTAT :1;
4465 unsigned GCEN :1;
4466 };
4467 } SSPCON2bits_t;
4468 extern volatile SSPCON2bits_t SSPCON2bits @ 0x216;
4469
4470 # 3481
4471 extern volatile unsigned char SSP1CON3 @ 0x217;
4472
4473 asm("SSP1CON3 equ 0217h");
4474
4475
4476 extern volatile unsigned char SSPCON3 @ 0x217;
4477
4478 asm("SSPCON3 equ 0217h");
4479
4480
4481 typedef union {
4482 struct {
4483 unsigned DHEN :1;
4484 unsigned AHEN :1;
4485 unsigned SBCDE :1;
4486 unsigned SDAHT :1;
4487 unsigned BOEN :1;
4488 unsigned SCIE :1;
4489 unsigned PCIE :1;
4490 unsigned ACKTIM :1;
4491 };
4492 } SSP1CON3bits_t;
4493 extern volatile SSP1CON3bits_t SSP1CON3bits @ 0x217;
4494
4495 # 3546
4496 typedef union {
4497 struct {
4498 unsigned DHEN :1;
4499 unsigned AHEN :1;
4500 unsigned SBCDE :1;
4501 unsigned SDAHT :1;
4502 unsigned BOEN :1;
4503 unsigned SCIE :1;
4504 unsigned PCIE :1;
4505 unsigned ACKTIM :1;
4506 };
4507 } SSPCON3bits_t;
4508 extern volatile SSPCON3bits_t SSPCON3bits @ 0x217;
4509
4510 # 3602
4511 extern volatile unsigned char CCPR1L @ 0x291;
4512
4513 asm("CCPR1L equ 0291h");
4514
4515
4516 typedef union {
4517 struct {
4518 unsigned CCPR1L :8;
4519 };
4520 } CCPR1Lbits_t;
4521 extern volatile CCPR1Lbits_t CCPR1Lbits @ 0x291;
4522
4523 # 3621
4524 extern volatile unsigned char CCPR1H @ 0x292;
4525
4526 asm("CCPR1H equ 0292h");
4527
4528
4529 typedef union {
4530 struct {
4531 unsigned CCPR1H :8;
4532 };
4533 } CCPR1Hbits_t;
4534 extern volatile CCPR1Hbits_t CCPR1Hbits @ 0x292;
4535
4536 # 3640
4537 extern volatile unsigned char CCP1CON @ 0x293;
4538
4539 asm("CCP1CON equ 0293h");
4540
4541
4542 typedef union {
4543 struct {
4544 unsigned CCP1M0 :1;
4545 unsigned CCP1M1 :1;
4546 unsigned CCP1M2 :1;
4547 unsigned CCP1M3 :1;
4548 unsigned DC1B0 :1;
4549 unsigned DC1B1 :1;
4550 unsigned P1M0 :1;
4551 unsigned P1M1 :1;
4552 };
4553 struct {
4554 unsigned CCP1M :4;
4555 unsigned DC1B :2;
4556 unsigned P1M :2;
4557 };
4558 } CCP1CONbits_t;
4559 extern volatile CCP1CONbits_t CCP1CONbits @ 0x293;
4560
4561 # 3721
4562 extern volatile unsigned char PWM1CON @ 0x294;
4563
4564 asm("PWM1CON equ 0294h");
4565
4566
4567 typedef union {
4568 struct {
4569 unsigned P1DC0 :1;
4570 unsigned P1DC1 :1;
4571 unsigned P1DC2 :1;
4572 unsigned P1DC3 :1;
4573 unsigned P1DC4 :1;
4574 unsigned P1DC5 :1;
4575 unsigned P1DC6 :1;
4576 unsigned P1RSEN :1;
4577 };
4578 struct {
4579 unsigned P1DC :7;
4580 };
4581 } PWM1CONbits_t;
4582 extern volatile PWM1CONbits_t PWM1CONbits @ 0x294;
4583
4584 # 3790
4585 extern volatile unsigned char CCP1AS @ 0x295;
4586
4587 asm("CCP1AS equ 0295h");
4588
4589
4590 extern volatile unsigned char ECCP1AS @ 0x295;
4591
4592 asm("ECCP1AS equ 0295h");
4593
4594
4595 typedef union {
4596 struct {
4597 unsigned PSS1BD0 :1;
4598 unsigned PSS1BD1 :1;
4599 unsigned PSS1AC0 :1;
4600 unsigned PSS1AC1 :1;
4601 unsigned CCP1AS0 :1;
4602 unsigned CCP1AS1 :1;
4603 unsigned CCP1AS2 :1;
4604 unsigned CCP1ASE :1;
4605 };
4606 struct {
4607 unsigned PSS1BD :2;
4608 unsigned PSS1AC :2;
4609 unsigned CCP1AS :3;
4610 };
4611 } CCP1ASbits_t;
4612 extern volatile CCP1ASbits_t CCP1ASbits @ 0x295;
4613
4614 # 3875
4615 typedef union {
4616 struct {
4617 unsigned PSS1BD0 :1;
4618 unsigned PSS1BD1 :1;
4619 unsigned PSS1AC0 :1;
4620 unsigned PSS1AC1 :1;
4621 unsigned CCP1AS0 :1;
4622 unsigned CCP1AS1 :1;
4623 unsigned CCP1AS2 :1;
4624 unsigned CCP1ASE :1;
4625 };
4626 struct {
4627 unsigned PSS1BD :2;
4628 unsigned PSS1AC :2;
4629 unsigned CCP1AS :3;
4630 };
4631 } ECCP1ASbits_t;
4632 extern volatile ECCP1ASbits_t ECCP1ASbits @ 0x295;
4633
4634 # 3951
4635 extern volatile unsigned char PSTR1CON @ 0x296;
4636
4637 asm("PSTR1CON equ 0296h");
4638
4639
4640 typedef union {
4641 struct {
4642 unsigned STR1A :1;
4643 unsigned STR1B :1;
4644 unsigned :1;
4645 unsigned :1;
4646 unsigned STR1SYNC :1;
4647 };
4648 } PSTR1CONbits_t;
4649 extern volatile PSTR1CONbits_t PSTR1CONbits @ 0x296;
4650
4651 # 3984
4652 extern volatile unsigned char IOCAP @ 0x391;
4653
4654 asm("IOCAP equ 0391h");
4655
4656
4657 typedef union {
4658 struct {
4659 unsigned IOCAP0 :1;
4660 unsigned IOCAP1 :1;
4661 unsigned IOCAP2 :1;
4662 unsigned IOCAP3 :1;
4663 unsigned IOCAP4 :1;
4664 unsigned IOCAP5 :1;
4665 };
4666 struct {
4667 unsigned IOCAP :6;
4668 };
4669 } IOCAPbits_t;
4670 extern volatile IOCAPbits_t IOCAPbits @ 0x391;
4671
4672 # 4041
4673 extern volatile unsigned char IOCAN @ 0x392;
4674
4675 asm("IOCAN equ 0392h");
4676
4677
4678 typedef union {
4679 struct {
4680 unsigned IOCAN0 :1;
4681 unsigned IOCAN1 :1;
4682 unsigned IOCAN2 :1;
4683 unsigned IOCAN3 :1;
4684 unsigned IOCAN4 :1;
4685 unsigned IOCAN5 :1;
4686 };
4687 struct {
4688 unsigned IOCAN :6;
4689 };
4690 } IOCANbits_t;
4691 extern volatile IOCANbits_t IOCANbits @ 0x392;
4692
4693 # 4098
4694 extern volatile unsigned char IOCAF @ 0x393;
4695
4696 asm("IOCAF equ 0393h");
4697
4698
4699 typedef union {
4700 struct {
4701 unsigned IOCAF0 :1;
4702 unsigned IOCAF1 :1;
4703 unsigned IOCAF2 :1;
4704 unsigned IOCAF3 :1;
4705 unsigned IOCAF4 :1;
4706 unsigned IOCAF5 :1;
4707 };
4708 struct {
4709 unsigned IOCAF :6;
4710 };
4711 } IOCAFbits_t;
4712 extern volatile IOCAFbits_t IOCAFbits @ 0x393;
4713
4714 # 4155
4715 extern volatile unsigned char CLKRCON @ 0x39A;
4716
4717 asm("CLKRCON equ 039Ah");
4718
4719
4720 typedef union {
4721 struct {
4722 unsigned CLKRDIV0 :1;
4723 unsigned CLKRDIV1 :1;
4724 unsigned CLKRDIV2 :1;
4725 unsigned CLKRDC0 :1;
4726 unsigned CLKRDC1 :1;
4727 unsigned CLKRSLR :1;
4728 unsigned CLKROE :1;
4729 unsigned CLKREN :1;
4730 };
4731 struct {
4732 unsigned CLKRDIV :3;
4733 unsigned CLKRDC :2;
4734 };
4735 } CLKRCONbits_t;
4736 extern volatile CLKRCONbits_t CLKRCONbits @ 0x39A;
4737
4738 # 4230
4739 extern volatile unsigned char MDCON @ 0x39C;
4740
4741 asm("MDCON equ 039Ch");
4742
4743
4744 typedef union {
4745 struct {
4746 unsigned MDBIT :1;
4747 unsigned :2;
4748 unsigned MDOUT :1;
4749 unsigned MDOPOL :1;
4750 unsigned MDSLR :1;
4751 unsigned MDOE :1;
4752 unsigned MDEN :1;
4753 };
4754 } MDCONbits_t;
4755 extern volatile MDCONbits_t MDCONbits @ 0x39C;
4756
4757 # 4280
4758 extern volatile unsigned char MDSRC @ 0x39D;
4759
4760 asm("MDSRC equ 039Dh");
4761
4762
4763 typedef union {
4764 struct {
4765 unsigned MDMS0 :1;
4766 unsigned MDMS1 :1;
4767 unsigned MDMS2 :1;
4768 unsigned MDMS3 :1;
4769 unsigned :3;
4770 unsigned MDMSODIS :1;
4771 };
4772 struct {
4773 unsigned MDMS :4;
4774 };
4775 } MDSRCbits_t;
4776 extern volatile MDSRCbits_t MDSRCbits @ 0x39D;
4777
4778 # 4332
4779 extern volatile unsigned char MDCARL @ 0x39E;
4780
4781 asm("MDCARL equ 039Eh");
4782
4783
4784 typedef union {
4785 struct {
4786 unsigned MDCL0 :1;
4787 unsigned MDCL1 :1;
4788 unsigned MDCL2 :1;
4789 unsigned MDCL3 :1;
4790 unsigned :1;
4791 unsigned MDCLSYNC :1;
4792 unsigned MDCLPOL :1;
4793 unsigned MDCLODIS :1;
4794 };
4795 struct {
4796 unsigned MDCL :4;
4797 };
4798 } MDCARLbits_t;
4799 extern volatile MDCARLbits_t MDCARLbits @ 0x39E;
4800
4801 # 4396
4802 extern volatile unsigned char MDCARH @ 0x39F;
4803
4804 asm("MDCARH equ 039Fh");
4805
4806
4807 typedef union {
4808 struct {
4809 unsigned MDCH0 :1;
4810 unsigned MDCH1 :1;
4811 unsigned MDCH2 :1;
4812 unsigned MDCH3 :1;
4813 unsigned :1;
4814 unsigned MDCHSYNC :1;
4815 unsigned MDCHPOL :1;
4816 unsigned MDCHODIS :1;
4817 };
4818 struct {
4819 unsigned MDCH :4;
4820 };
4821 } MDCARHbits_t;
4822 extern volatile MDCARHbits_t MDCARHbits @ 0x39F;
4823
4824 # 4460
4825 extern volatile unsigned char STATUS_SHAD @ 0xFE4;
4826
4827 asm("STATUS_SHAD equ 0FE4h");
4828
4829
4830 typedef union {
4831 struct {
4832 unsigned C_SHAD :1;
4833 unsigned DC_SHAD :1;
4834 unsigned Z_SHAD :1;
4835 };
4836 } STATUS_SHADbits_t;
4837 extern volatile STATUS_SHADbits_t STATUS_SHADbits @ 0xFE4;
4838
4839 # 4491
4840 extern volatile unsigned char WREG_SHAD @ 0xFE5;
4841
4842 asm("WREG_SHAD equ 0FE5h");
4843
4844
4845 typedef union {
4846 struct {
4847 unsigned WREG_SHAD :8;
4848 };
4849 } WREG_SHADbits_t;
4850 extern volatile WREG_SHADbits_t WREG_SHADbits @ 0xFE5;
4851
4852 # 4510
4853 extern volatile unsigned char BSR_SHAD @ 0xFE6;
4854
4855 asm("BSR_SHAD equ 0FE6h");
4856
4857
4858 typedef union {
4859 struct {
4860 unsigned BSR_SHAD :5;
4861 };
4862 } BSR_SHADbits_t;
4863 extern volatile BSR_SHADbits_t BSR_SHADbits @ 0xFE6;
4864
4865 # 4529
4866 extern volatile unsigned char PCLATH_SHAD @ 0xFE7;
4867
4868 asm("PCLATH_SHAD equ 0FE7h");
4869
4870
4871 typedef union {
4872 struct {
4873 unsigned PCLATH_SHAD :7;
4874 };
4875 } PCLATH_SHADbits_t;
4876 extern volatile PCLATH_SHADbits_t PCLATH_SHADbits @ 0xFE7;
4877
4878 # 4548
4879 extern volatile unsigned char FSR0L_SHAD @ 0xFE8;
4880
4881 asm("FSR0L_SHAD equ 0FE8h");
4882
4883
4884 typedef union {
4885 struct {
4886 unsigned FSR0L_SHAD :8;
4887 };
4888 } FSR0L_SHADbits_t;
4889 extern volatile FSR0L_SHADbits_t FSR0L_SHADbits @ 0xFE8;
4890
4891 # 4567
4892 extern volatile unsigned char FSR0H_SHAD @ 0xFE9;
4893
4894 asm("FSR0H_SHAD equ 0FE9h");
4895
4896
4897 typedef union {
4898 struct {
4899 unsigned FSR0H_SHAD :8;
4900 };
4901 } FSR0H_SHADbits_t;
4902 extern volatile FSR0H_SHADbits_t FSR0H_SHADbits @ 0xFE9;
4903
4904 # 4586
4905 extern volatile unsigned char FSR1L_SHAD @ 0xFEA;
4906
4907 asm("FSR1L_SHAD equ 0FEAh");
4908
4909
4910 typedef union {
4911 struct {
4912 unsigned FSR1L_SHAD :8;
4913 };
4914 } FSR1L_SHADbits_t;
4915 extern volatile FSR1L_SHADbits_t FSR1L_SHADbits @ 0xFEA;
4916
4917 # 4605
4918 extern volatile unsigned char FSR1H_SHAD @ 0xFEB;
4919
4920 asm("FSR1H_SHAD equ 0FEBh");
4921
4922
4923 typedef union {
4924 struct {
4925 unsigned FSR1H_SHAD :8;
4926 };
4927 } FSR1H_SHADbits_t;
4928 extern volatile FSR1H_SHADbits_t FSR1H_SHADbits @ 0xFEB;
4929
4930 # 4624
4931 extern volatile unsigned char STKPTR @ 0xFED;
4932
4933 asm("STKPTR equ 0FEDh");
4934
4935
4936 typedef union {
4937 struct {
4938 unsigned STKPTR :5;
4939 };
4940 } STKPTRbits_t;
4941 extern volatile STKPTRbits_t STKPTRbits @ 0xFED;
4942
4943 # 4643
4944 extern volatile unsigned char TOSL @ 0xFEE;
4945
4946 asm("TOSL equ 0FEEh");
4947
4948
4949 typedef union {
4950 struct {
4951 unsigned TOSL :8;
4952 };
4953 } TOSLbits_t;
4954 extern volatile TOSLbits_t TOSLbits @ 0xFEE;
4955
4956 # 4662
4957 extern volatile unsigned char TOSH @ 0xFEF;
4958
4959 asm("TOSH equ 0FEFh");
4960
4961
4962 typedef union {
4963 struct {
4964 unsigned TOSH :7;
4965 };
4966 } TOSHbits_t;
4967 extern volatile TOSHbits_t TOSHbits @ 0xFEF;
4968
4969 # 4687
4970 extern volatile __bit ABDEN @ (((unsigned) &BAUDCON)*8) + 0;
4971
4972 extern volatile __bit ABDOVF @ (((unsigned) &BAUDCON)*8) + 7;
4973
4974 extern volatile __bit ACKDT @ (((unsigned) &SSP1CON2)*8) + 5;
4975
4976 extern volatile __bit ACKEN @ (((unsigned) &SSP1CON2)*8) + 4;
4977
4978 extern volatile __bit ACKSTAT @ (((unsigned) &SSP1CON2)*8) + 6;
4979
4980 extern volatile __bit ACKTIM @ (((unsigned) &SSP1CON3)*8) + 7;
4981
4982 extern volatile __bit ADCS0 @ (((unsigned) &ADCON1)*8) + 4;
4983
4984 extern volatile __bit ADCS1 @ (((unsigned) &ADCON1)*8) + 5;
4985
4986 extern volatile __bit ADCS2 @ (((unsigned) &ADCON1)*8) + 6;
4987
4988 extern volatile __bit ADDEN @ (((unsigned) &RCSTA)*8) + 3;
4989
4990 extern volatile __bit ADFM @ (((unsigned) &ADCON1)*8) + 7;
4991
4992 extern volatile __bit ADFVR0 @ (((unsigned) &FVRCON)*8) + 0;
4993
4994 extern volatile __bit ADFVR1 @ (((unsigned) &FVRCON)*8) + 1;
4995
4996 extern volatile __bit ADGO @ (((unsigned) &ADCON0)*8) + 1;
4997
4998 extern volatile __bit ADIE @ (((unsigned) &PIE1)*8) + 6;
4999
5000 extern volatile __bit ADIF @ (((unsigned) &PIR1)*8) + 6;
5001
5002 extern volatile __bit ADON @ (((unsigned) &ADCON0)*8) + 0;
5003
5004 extern volatile __bit ADPREF0 @ (((unsigned) &ADCON1)*8) + 0;
5005
5006 extern volatile __bit ADPREF1 @ (((unsigned) &ADCON1)*8) + 1;
5007
5008 extern volatile __bit AHEN @ (((unsigned) &SSP1CON3)*8) + 1;
5009
5010 extern volatile __bit ANSA0 @ (((unsigned) &ANSELA)*8) + 0;
5011
5012 extern volatile __bit ANSA1 @ (((unsigned) &ANSELA)*8) + 1;
5013
5014 extern volatile __bit ANSA2 @ (((unsigned) &ANSELA)*8) + 2;
5015
5016 extern volatile __bit ANSA4 @ (((unsigned) &ANSELA)*8) + 4;
5017
5018 extern volatile __bit BCL1IE @ (((unsigned) &PIE2)*8) + 3;
5019
5020 extern volatile __bit BCL1IF @ (((unsigned) &PIR2)*8) + 3;
5021
5022 extern volatile __bit BF @ (((unsigned) &SSP1STAT)*8) + 0;
5023
5024 extern volatile __bit BOEN @ (((unsigned) &SSP1CON3)*8) + 4;
5025
5026 extern volatile __bit BORFS @ (((unsigned) &BORCON)*8) + 6;
5027
5028 extern volatile __bit BORRDY @ (((unsigned) &BORCON)*8) + 0;
5029
5030 extern volatile __bit BRG16 @ (((unsigned) &BAUDCON)*8) + 3;
5031
5032 extern volatile __bit BRGH @ (((unsigned) &TXSTA)*8) + 2;
5033
5034 extern volatile __bit BSR0 @ (((unsigned) &BSR)*8) + 0;
5035
5036 extern volatile __bit BSR1 @ (((unsigned) &BSR)*8) + 1;
5037
5038 extern volatile __bit BSR2 @ (((unsigned) &BSR)*8) + 2;
5039
5040 extern volatile __bit BSR3 @ (((unsigned) &BSR)*8) + 3;
5041
5042 extern volatile __bit BSR4 @ (((unsigned) &BSR)*8) + 4;
5043
5044 extern volatile __bit C1HYS @ (((unsigned) &CM1CON0)*8) + 1;
5045
5046 extern volatile __bit C1IE @ (((unsigned) &PIE2)*8) + 5;
5047
5048 extern volatile __bit C1IF @ (((unsigned) &PIR2)*8) + 5;
5049
5050 extern volatile __bit C1INTN @ (((unsigned) &CM1CON1)*8) + 6;
5051
5052 extern volatile __bit C1INTP @ (((unsigned) &CM1CON1)*8) + 7;
5053
5054 extern volatile __bit C1NCH @ (((unsigned) &CM1CON1)*8) + 0;
5055
5056 extern volatile __bit C1NCH0 @ (((unsigned) &CM1CON1)*8) + 0;
5057
5058 extern volatile __bit C1OE @ (((unsigned) &CM1CON0)*8) + 5;
5059
5060 extern volatile __bit C1ON @ (((unsigned) &CM1CON0)*8) + 7;
5061
5062 extern volatile __bit C1OUT @ (((unsigned) &CM1CON0)*8) + 6;
5063
5064 extern volatile __bit C1PCH0 @ (((unsigned) &CM1CON1)*8) + 4;
5065
5066 extern volatile __bit C1PCH1 @ (((unsigned) &CM1CON1)*8) + 5;
5067
5068 extern volatile __bit C1POL @ (((unsigned) &CM1CON0)*8) + 4;
5069
5070 extern volatile __bit C1SP @ (((unsigned) &CM1CON0)*8) + 2;
5071
5072 extern volatile __bit C1SYNC @ (((unsigned) &CM1CON0)*8) + 0;
5073
5074 extern volatile __bit CARRY @ (((unsigned) &STATUS)*8) + 0;
5075
5076 extern volatile __bit CCP1AS0 @ (((unsigned) &CCP1AS)*8) + 4;
5077
5078 extern volatile __bit CCP1AS1 @ (((unsigned) &CCP1AS)*8) + 5;
5079
5080 extern volatile __bit CCP1AS2 @ (((unsigned) &CCP1AS)*8) + 6;
5081
5082 extern volatile __bit CCP1ASE @ (((unsigned) &CCP1AS)*8) + 7;
5083
5084 extern volatile __bit CCP1IE @ (((unsigned) &PIE1)*8) + 2;
5085
5086 extern volatile __bit CCP1IF @ (((unsigned) &PIR1)*8) + 2;
5087
5088 extern volatile __bit CCP1M0 @ (((unsigned) &CCP1CON)*8) + 0;
5089
5090 extern volatile __bit CCP1M1 @ (((unsigned) &CCP1CON)*8) + 1;
5091
5092 extern volatile __bit CCP1M2 @ (((unsigned) &CCP1CON)*8) + 2;
5093
5094 extern volatile __bit CCP1M3 @ (((unsigned) &CCP1CON)*8) + 3;
5095
5096 extern volatile __bit CCP1SEL @ (((unsigned) &APFCON)*8) + 0;
5097
5098 extern volatile __bit CDAFVR0 @ (((unsigned) &FVRCON)*8) + 2;
5099
5100 extern volatile __bit CDAFVR1 @ (((unsigned) &FVRCON)*8) + 3;
5101
5102 extern volatile __bit CFGS @ (((unsigned) &EECON1)*8) + 6;
5103
5104 extern volatile __bit CHS0 @ (((unsigned) &ADCON0)*8) + 2;
5105
5106 extern volatile __bit CHS1 @ (((unsigned) &ADCON0)*8) + 3;
5107
5108 extern volatile __bit CHS2 @ (((unsigned) &ADCON0)*8) + 4;
5109
5110 extern volatile __bit CHS3 @ (((unsigned) &ADCON0)*8) + 5;
5111
5112 extern volatile __bit CHS4 @ (((unsigned) &ADCON0)*8) + 6;
5113
5114 extern volatile __bit CKE @ (((unsigned) &SSP1STAT)*8) + 6;
5115
5116 extern volatile __bit CKP @ (((unsigned) &SSP1CON1)*8) + 4;
5117
5118 extern volatile __bit CLKRDC0 @ (((unsigned) &CLKRCON)*8) + 3;
5119
5120 extern volatile __bit CLKRDC1 @ (((unsigned) &CLKRCON)*8) + 4;
5121
5122 extern volatile __bit CLKRDIV0 @ (((unsigned) &CLKRCON)*8) + 0;
5123
5124 extern volatile __bit CLKRDIV1 @ (((unsigned) &CLKRCON)*8) + 1;
5125
5126 extern volatile __bit CLKRDIV2 @ (((unsigned) &CLKRCON)*8) + 2;
5127
5128 extern volatile __bit CLKREN @ (((unsigned) &CLKRCON)*8) + 7;
5129
5130 extern volatile __bit CLKROE @ (((unsigned) &CLKRCON)*8) + 6;
5131
5132 extern volatile __bit CLKRSLR @ (((unsigned) &CLKRCON)*8) + 5;
5133
5134 extern volatile __bit CPSCH0 @ (((unsigned) &CPSCON1)*8) + 0;
5135
5136 extern volatile __bit CPSCH1 @ (((unsigned) &CPSCON1)*8) + 1;
5137
5138 extern volatile __bit CPSON @ (((unsigned) &CPSCON0)*8) + 7;
5139
5140 extern volatile __bit CPSOUT @ (((unsigned) &CPSCON0)*8) + 1;
5141
5142 extern volatile __bit CPSRM @ (((unsigned) &CPSCON0)*8) + 6;
5143
5144 extern volatile __bit CPSRNG0 @ (((unsigned) &CPSCON0)*8) + 2;
5145
5146 extern volatile __bit CPSRNG1 @ (((unsigned) &CPSCON0)*8) + 3;
5147
5148 extern volatile __bit CREN @ (((unsigned) &RCSTA)*8) + 4;
5149
5150 extern volatile __bit CSRC @ (((unsigned) &TXSTA)*8) + 7;
5151
5152 extern volatile __bit C_SHAD @ (((unsigned) &STATUS_SHAD)*8) + 0;
5153
5154 extern volatile __bit DACEN @ (((unsigned) &DACCON0)*8) + 7;
5155
5156 extern volatile __bit DACLPS @ (((unsigned) &DACCON0)*8) + 6;
5157
5158 extern volatile __bit DACOE @ (((unsigned) &DACCON0)*8) + 5;
5159
5160 extern volatile __bit DACPSS0 @ (((unsigned) &DACCON0)*8) + 2;
5161
5162 extern volatile __bit DACPSS1 @ (((unsigned) &DACCON0)*8) + 3;
5163
5164 extern volatile __bit DACR0 @ (((unsigned) &DACCON1)*8) + 0;
5165
5166 extern volatile __bit DACR1 @ (((unsigned) &DACCON1)*8) + 1;
5167
5168 extern volatile __bit DACR2 @ (((unsigned) &DACCON1)*8) + 2;
5169
5170 extern volatile __bit DACR3 @ (((unsigned) &DACCON1)*8) + 3;
5171
5172 extern volatile __bit DACR4 @ (((unsigned) &DACCON1)*8) + 4;
5173
5174 extern volatile __bit DC @ (((unsigned) &STATUS)*8) + 1;
5175
5176 extern volatile __bit DC1B0 @ (((unsigned) &CCP1CON)*8) + 4;
5177
5178 extern volatile __bit DC1B1 @ (((unsigned) &CCP1CON)*8) + 5;
5179
5180 extern volatile __bit DC_SHAD @ (((unsigned) &STATUS_SHAD)*8) + 1;
5181
5182 extern volatile __bit DHEN @ (((unsigned) &SSP1CON3)*8) + 0;
5183
5184 extern volatile __bit D_nA @ (((unsigned) &SSP1STAT)*8) + 5;
5185
5186 extern volatile __bit EEIE @ (((unsigned) &PIE2)*8) + 4;
5187
5188 extern volatile __bit EEIF @ (((unsigned) &PIR2)*8) + 4;
5189
5190 extern volatile __bit EEPGD @ (((unsigned) &EECON1)*8) + 7;
5191
5192 extern volatile __bit FERR @ (((unsigned) &RCSTA)*8) + 2;
5193
5194 extern volatile __bit FREE @ (((unsigned) &EECON1)*8) + 4;
5195
5196 extern volatile __bit FVREN @ (((unsigned) &FVRCON)*8) + 7;
5197
5198 extern volatile __bit FVRRDY @ (((unsigned) &FVRCON)*8) + 6;
5199
5200 extern volatile __bit GCEN @ (((unsigned) &SSP1CON2)*8) + 7;
5201
5202 extern volatile __bit GIE @ (((unsigned) &INTCON)*8) + 7;
5203
5204 extern volatile __bit GO @ (((unsigned) &ADCON0)*8) + 1;
5205
5206 extern volatile __bit GO_nDONE @ (((unsigned) &ADCON0)*8) + 1;
5207
5208 extern volatile __bit HFIOFL @ (((unsigned) &OSCSTAT)*8) + 3;
5209
5210 extern volatile __bit HFIOFR @ (((unsigned) &OSCSTAT)*8) + 4;
5211
5212 extern volatile __bit HFIOFS @ (((unsigned) &OSCSTAT)*8) + 0;
5213
5214 extern volatile __bit INTE @ (((unsigned) &INTCON)*8) + 4;
5215
5216 extern volatile __bit INTEDG @ (((unsigned) &OPTION_REG)*8) + 6;
5217
5218 extern volatile __bit INTF @ (((unsigned) &INTCON)*8) + 1;
5219
5220 extern volatile __bit IOCAF0 @ (((unsigned) &IOCAF)*8) + 0;
5221
5222 extern volatile __bit IOCAF1 @ (((unsigned) &IOCAF)*8) + 1;
5223
5224 extern volatile __bit IOCAF2 @ (((unsigned) &IOCAF)*8) + 2;
5225
5226 extern volatile __bit IOCAF3 @ (((unsigned) &IOCAF)*8) + 3;
5227
5228 extern volatile __bit IOCAF4 @ (((unsigned) &IOCAF)*8) + 4;
5229
5230 extern volatile __bit IOCAF5 @ (((unsigned) &IOCAF)*8) + 5;
5231
5232 extern volatile __bit IOCAN0 @ (((unsigned) &IOCAN)*8) + 0;
5233
5234 extern volatile __bit IOCAN1 @ (((unsigned) &IOCAN)*8) + 1;
5235
5236 extern volatile __bit IOCAN2 @ (((unsigned) &IOCAN)*8) + 2;
5237
5238 extern volatile __bit IOCAN3 @ (((unsigned) &IOCAN)*8) + 3;
5239
5240 extern volatile __bit IOCAN4 @ (((unsigned) &IOCAN)*8) + 4;
5241
5242 extern volatile __bit IOCAN5 @ (((unsigned) &IOCAN)*8) + 5;
5243
5244 extern volatile __bit IOCAP0 @ (((unsigned) &IOCAP)*8) + 0;
5245
5246 extern volatile __bit IOCAP1 @ (((unsigned) &IOCAP)*8) + 1;
5247
5248 extern volatile __bit IOCAP2 @ (((unsigned) &IOCAP)*8) + 2;
5249
5250 extern volatile __bit IOCAP3 @ (((unsigned) &IOCAP)*8) + 3;
5251
5252 extern volatile __bit IOCAP4 @ (((unsigned) &IOCAP)*8) + 4;
5253
5254 extern volatile __bit IOCAP5 @ (((unsigned) &IOCAP)*8) + 5;
5255
5256 extern volatile __bit IOCIE @ (((unsigned) &INTCON)*8) + 3;
5257
5258 extern volatile __bit IOCIF @ (((unsigned) &INTCON)*8) + 0;
5259
5260 extern volatile __bit IRCF0 @ (((unsigned) &OSCCON)*8) + 3;
5261
5262 extern volatile __bit IRCF1 @ (((unsigned) &OSCCON)*8) + 4;
5263
5264 extern volatile __bit IRCF2 @ (((unsigned) &OSCCON)*8) + 5;
5265
5266 extern volatile __bit IRCF3 @ (((unsigned) &OSCCON)*8) + 6;
5267
5268 extern volatile __bit LATA0 @ (((unsigned) &LATA)*8) + 0;
5269
5270 extern volatile __bit LATA1 @ (((unsigned) &LATA)*8) + 1;
5271
5272 extern volatile __bit LATA2 @ (((unsigned) &LATA)*8) + 2;
5273
5274 extern volatile __bit LATA4 @ (((unsigned) &LATA)*8) + 4;
5275
5276 extern volatile __bit LATA5 @ (((unsigned) &LATA)*8) + 5;
5277
5278 extern volatile __bit LFIOFR @ (((unsigned) &OSCSTAT)*8) + 1;
5279
5280 extern volatile __bit LWLO @ (((unsigned) &EECON1)*8) + 5;
5281
5282 extern volatile __bit MC1OUT @ (((unsigned) &CMOUT)*8) + 0;
5283
5284 extern volatile __bit MDBIT @ (((unsigned) &MDCON)*8) + 0;
5285
5286 extern volatile __bit MDCH0 @ (((unsigned) &MDCARH)*8) + 0;
5287
5288 extern volatile __bit MDCH1 @ (((unsigned) &MDCARH)*8) + 1;
5289
5290 extern volatile __bit MDCH2 @ (((unsigned) &MDCARH)*8) + 2;
5291
5292 extern volatile __bit MDCH3 @ (((unsigned) &MDCARH)*8) + 3;
5293
5294 extern volatile __bit MDCHODIS @ (((unsigned) &MDCARH)*8) + 7;
5295
5296 extern volatile __bit MDCHPOL @ (((unsigned) &MDCARH)*8) + 6;
5297
5298 extern volatile __bit MDCHSYNC @ (((unsigned) &MDCARH)*8) + 5;
5299
5300 extern volatile __bit MDCL0 @ (((unsigned) &MDCARL)*8) + 0;
5301
5302 extern volatile __bit MDCL1 @ (((unsigned) &MDCARL)*8) + 1;
5303
5304 extern volatile __bit MDCL2 @ (((unsigned) &MDCARL)*8) + 2;
5305
5306 extern volatile __bit MDCL3 @ (((unsigned) &MDCARL)*8) + 3;
5307
5308 extern volatile __bit MDCLODIS @ (((unsigned) &MDCARL)*8) + 7;
5309
5310 extern volatile __bit MDCLPOL @ (((unsigned) &MDCARL)*8) + 6;
5311
5312 extern volatile __bit MDCLSYNC @ (((unsigned) &MDCARL)*8) + 5;
5313
5314 extern volatile __bit MDEN @ (((unsigned) &MDCON)*8) + 7;
5315
5316 extern volatile __bit MDMS0 @ (((unsigned) &MDSRC)*8) + 0;
5317
5318 extern volatile __bit MDMS1 @ (((unsigned) &MDSRC)*8) + 1;
5319
5320 extern volatile __bit MDMS2 @ (((unsigned) &MDSRC)*8) + 2;
5321
5322 extern volatile __bit MDMS3 @ (((unsigned) &MDSRC)*8) + 3;
5323
5324 extern volatile __bit MDMSODIS @ (((unsigned) &MDSRC)*8) + 7;
5325
5326 extern volatile __bit MDOE @ (((unsigned) &MDCON)*8) + 6;
5327
5328 extern volatile __bit MDOPOL @ (((unsigned) &MDCON)*8) + 4;
5329
5330 extern volatile __bit MDOUT @ (((unsigned) &MDCON)*8) + 3;
5331
5332 extern volatile __bit MDSLR @ (((unsigned) &MDCON)*8) + 5;
5333
5334 extern volatile __bit MFIOFR @ (((unsigned) &OSCSTAT)*8) + 2;
5335
5336 extern volatile __bit OERR @ (((unsigned) &RCSTA)*8) + 1;
5337
5338 extern volatile __bit OSFIE @ (((unsigned) &PIE2)*8) + 7;
5339
5340 extern volatile __bit OSFIF @ (((unsigned) &PIR2)*8) + 7;
5341
5342 extern volatile __bit OSTS @ (((unsigned) &OSCSTAT)*8) + 5;
5343
5344 extern volatile __bit P1BSEL @ (((unsigned) &APFCON)*8) + 1;
5345
5346 extern volatile __bit P1DC0 @ (((unsigned) &PWM1CON)*8) + 0;
5347
5348 extern volatile __bit P1DC1 @ (((unsigned) &PWM1CON)*8) + 1;
5349
5350 extern volatile __bit P1DC2 @ (((unsigned) &PWM1CON)*8) + 2;
5351
5352 extern volatile __bit P1DC3 @ (((unsigned) &PWM1CON)*8) + 3;
5353
5354 extern volatile __bit P1DC4 @ (((unsigned) &PWM1CON)*8) + 4;
5355
5356 extern volatile __bit P1DC5 @ (((unsigned) &PWM1CON)*8) + 5;
5357
5358 extern volatile __bit P1DC6 @ (((unsigned) &PWM1CON)*8) + 6;
5359
5360 extern volatile __bit P1M0 @ (((unsigned) &CCP1CON)*8) + 6;
5361
5362 extern volatile __bit P1M1 @ (((unsigned) &CCP1CON)*8) + 7;
5363
5364 extern volatile __bit P1RSEN @ (((unsigned) &PWM1CON)*8) + 7;
5365
5366 extern volatile __bit PCIE @ (((unsigned) &SSP1CON3)*8) + 6;
5367
5368 extern volatile __bit PEIE @ (((unsigned) &INTCON)*8) + 6;
5369
5370 extern volatile __bit PEN @ (((unsigned) &SSP1CON2)*8) + 2;
5371
5372 extern volatile __bit PLLR @ (((unsigned) &OSCSTAT)*8) + 6;
5373
5374 extern volatile __bit PS0 @ (((unsigned) &OPTION_REG)*8) + 0;
5375
5376 extern volatile __bit PS1 @ (((unsigned) &OPTION_REG)*8) + 1;
5377
5378 extern volatile __bit PS2 @ (((unsigned) &OPTION_REG)*8) + 2;
5379
5380 extern volatile __bit PSA @ (((unsigned) &OPTION_REG)*8) + 3;
5381
5382 extern volatile __bit PSS1AC0 @ (((unsigned) &CCP1AS)*8) + 2;
5383
5384 extern volatile __bit PSS1AC1 @ (((unsigned) &CCP1AS)*8) + 3;
5385
5386 extern volatile __bit PSS1BD0 @ (((unsigned) &CCP1AS)*8) + 0;
5387
5388 extern volatile __bit PSS1BD1 @ (((unsigned) &CCP1AS)*8) + 1;
5389
5390 extern volatile __bit RA0 @ (((unsigned) &PORTA)*8) + 0;
5391
5392 extern volatile __bit RA1 @ (((unsigned) &PORTA)*8) + 1;
5393
5394 extern volatile __bit RA2 @ (((unsigned) &PORTA)*8) + 2;
5395
5396 extern volatile __bit RA3 @ (((unsigned) &PORTA)*8) + 3;
5397
5398 extern volatile __bit RA4 @ (((unsigned) &PORTA)*8) + 4;
5399
5400 extern volatile __bit RA5 @ (((unsigned) &PORTA)*8) + 5;
5401
5402 extern volatile __bit RCEN @ (((unsigned) &SSP1CON2)*8) + 3;
5403
5404 extern volatile __bit RCIDL @ (((unsigned) &BAUDCON)*8) + 6;
5405
5406 extern volatile __bit RCIE @ (((unsigned) &PIE1)*8) + 5;
5407
5408 extern volatile __bit RCIF @ (((unsigned) &PIR1)*8) + 5;
5409
5410 extern volatile __bit RD @ (((unsigned) &EECON1)*8) + 0;
5411
5412 extern volatile __bit RSEN @ (((unsigned) &SSP1CON2)*8) + 1;
5413
5414 extern volatile __bit RX9 @ (((unsigned) &RCSTA)*8) + 6;
5415
5416 extern volatile __bit RX9D @ (((unsigned) &RCSTA)*8) + 0;
5417
5418 extern volatile __bit RXDTSEL @ (((unsigned) &APFCON)*8) + 7;
5419
5420 extern volatile __bit R_nW @ (((unsigned) &SSP1STAT)*8) + 2;
5421
5422 extern volatile __bit SBCDE @ (((unsigned) &SSP1CON3)*8) + 2;
5423
5424 extern volatile __bit SBOREN @ (((unsigned) &BORCON)*8) + 7;
5425
5426 extern volatile __bit SCIE @ (((unsigned) &SSP1CON3)*8) + 5;
5427
5428 extern volatile __bit SCKP @ (((unsigned) &BAUDCON)*8) + 4;
5429
5430 extern volatile __bit SCS0 @ (((unsigned) &OSCCON)*8) + 0;
5431
5432 extern volatile __bit SCS1 @ (((unsigned) &OSCCON)*8) + 1;
5433
5434 extern volatile __bit SDAHT @ (((unsigned) &SSP1CON3)*8) + 3;
5435
5436 extern volatile __bit SDO1SEL @ (((unsigned) &APFCON)*8) + 6;
5437
5438 extern volatile __bit SDOSEL @ (((unsigned) &APFCON)*8) + 6;
5439
5440 extern volatile __bit SEN @ (((unsigned) &SSP1CON2)*8) + 0;
5441
5442 extern volatile __bit SENDB @ (((unsigned) &TXSTA)*8) + 3;
5443
5444 extern volatile __bit SMP @ (((unsigned) &SSP1STAT)*8) + 7;
5445
5446 extern volatile __bit SPEN @ (((unsigned) &RCSTA)*8) + 7;
5447
5448 extern volatile __bit SPLLEN @ (((unsigned) &OSCCON)*8) + 7;
5449
5450 extern volatile __bit SRCLK0 @ (((unsigned) &SRCON0)*8) + 4;
5451
5452 extern volatile __bit SRCLK1 @ (((unsigned) &SRCON0)*8) + 5;
5453
5454 extern volatile __bit SRCLK2 @ (((unsigned) &SRCON0)*8) + 6;
5455
5456 extern volatile __bit SREN @ (((unsigned) &RCSTA)*8) + 5;
5457
5458 extern volatile __bit SRLEN @ (((unsigned) &SRCON0)*8) + 7;
5459
5460 extern volatile __bit SRNQEN @ (((unsigned) &SRCON0)*8) + 2;
5461
5462 extern volatile __bit SRPR @ (((unsigned) &SRCON0)*8) + 0;
5463
5464 extern volatile __bit SRPS @ (((unsigned) &SRCON0)*8) + 1;
5465
5466 extern volatile __bit SRQEN @ (((unsigned) &SRCON0)*8) + 3;
5467
5468 extern volatile __bit SRRC1E @ (((unsigned) &SRCON1)*8) + 0;
5469
5470 extern volatile __bit SRRCKE @ (((unsigned) &SRCON1)*8) + 2;
5471
5472 extern volatile __bit SRRPE @ (((unsigned) &SRCON1)*8) + 3;
5473
5474 extern volatile __bit SRSC1E @ (((unsigned) &SRCON1)*8) + 4;
5475
5476 extern volatile __bit SRSCKE @ (((unsigned) &SRCON1)*8) + 6;
5477
5478 extern volatile __bit SRSPE @ (((unsigned) &SRCON1)*8) + 7;
5479
5480 extern volatile __bit SS1SEL @ (((unsigned) &APFCON)*8) + 5;
5481
5482 extern volatile __bit SSP1IE @ (((unsigned) &PIE1)*8) + 3;
5483
5484 extern volatile __bit SSP1IF @ (((unsigned) &PIR1)*8) + 3;
5485
5486 extern volatile __bit SSPEN @ (((unsigned) &SSP1CON1)*8) + 5;
5487
5488 extern volatile __bit SSPM0 @ (((unsigned) &SSP1CON1)*8) + 0;
5489
5490 extern volatile __bit SSPM1 @ (((unsigned) &SSP1CON1)*8) + 1;
5491
5492 extern volatile __bit SSPM2 @ (((unsigned) &SSP1CON1)*8) + 2;
5493
5494 extern volatile __bit SSPM3 @ (((unsigned) &SSP1CON1)*8) + 3;
5495
5496 extern volatile __bit SSPOV @ (((unsigned) &SSP1CON1)*8) + 6;
5497
5498 extern volatile __bit SSSEL @ (((unsigned) &APFCON)*8) + 5;
5499
5500 extern volatile __bit STKOVF @ (((unsigned) &PCON)*8) + 7;
5501
5502 extern volatile __bit STKUNF @ (((unsigned) &PCON)*8) + 6;
5503
5504 extern volatile __bit STR1A @ (((unsigned) &PSTR1CON)*8) + 0;
5505
5506 extern volatile __bit STR1B @ (((unsigned) &PSTR1CON)*8) + 1;
5507
5508 extern volatile __bit STR1SYNC @ (((unsigned) &PSTR1CON)*8) + 4;
5509
5510 extern volatile __bit SWDTEN @ (((unsigned) &WDTCON)*8) + 0;
5511
5512 extern volatile __bit SYNC @ (((unsigned) &TXSTA)*8) + 4;
5513
5514 extern volatile __bit T0CS @ (((unsigned) &OPTION_REG)*8) + 5;
5515
5516 extern volatile __bit T0IE @ (((unsigned) &INTCON)*8) + 5;
5517
5518 extern volatile __bit T0IF @ (((unsigned) &INTCON)*8) + 2;
5519
5520 extern volatile __bit T0SE @ (((unsigned) &OPTION_REG)*8) + 4;
5521
5522 extern volatile __bit T0XCS @ (((unsigned) &CPSCON0)*8) + 0;
5523
5524 extern volatile __bit T1CKPS0 @ (((unsigned) &T1CON)*8) + 4;
5525
5526 extern volatile __bit T1CKPS1 @ (((unsigned) &T1CON)*8) + 5;
5527
5528 extern volatile __bit T1GGO @ (((unsigned) &T1GCON)*8) + 3;
5529
5530 extern volatile __bit T1GGO_nDONE @ (((unsigned) &T1GCON)*8) + 3;
5531
5532 extern volatile __bit T1GPOL @ (((unsigned) &T1GCON)*8) + 6;
5533
5534 extern volatile __bit T1GSEL @ (((unsigned) &APFCON)*8) + 3;
5535
5536 extern volatile __bit T1GSPM @ (((unsigned) &T1GCON)*8) + 4;
5537
5538 extern volatile __bit T1GSS0 @ (((unsigned) &T1GCON)*8) + 0;
5539
5540 extern volatile __bit T1GSS1 @ (((unsigned) &T1GCON)*8) + 1;
5541
5542 extern volatile __bit T1GTM @ (((unsigned) &T1GCON)*8) + 5;
5543
5544 extern volatile __bit T1GVAL @ (((unsigned) &T1GCON)*8) + 2;
5545
5546 extern volatile __bit T1OSCEN @ (((unsigned) &T1CON)*8) + 3;
5547
5548 extern volatile __bit T1OSCR @ (((unsigned) &OSCSTAT)*8) + 7;
5549
5550 extern volatile __bit T2CKPS0 @ (((unsigned) &T2CON)*8) + 0;
5551
5552 extern volatile __bit T2CKPS1 @ (((unsigned) &T2CON)*8) + 1;
5553
5554 extern volatile __bit T2OUTPS0 @ (((unsigned) &T2CON)*8) + 3;
5555
5556 extern volatile __bit T2OUTPS1 @ (((unsigned) &T2CON)*8) + 4;
5557
5558 extern volatile __bit T2OUTPS2 @ (((unsigned) &T2CON)*8) + 5;
5559
5560 extern volatile __bit T2OUTPS3 @ (((unsigned) &T2CON)*8) + 6;
5561
5562 extern volatile __bit TMR0CS @ (((unsigned) &OPTION_REG)*8) + 5;
5563
5564 extern volatile __bit TMR0IE @ (((unsigned) &INTCON)*8) + 5;
5565
5566 extern volatile __bit TMR0IF @ (((unsigned) &INTCON)*8) + 2;
5567
5568 extern volatile __bit TMR0SE @ (((unsigned) &OPTION_REG)*8) + 4;
5569
5570 extern volatile __bit TMR1CS0 @ (((unsigned) &T1CON)*8) + 6;
5571
5572 extern volatile __bit TMR1CS1 @ (((unsigned) &T1CON)*8) + 7;
5573
5574 extern volatile __bit TMR1GE @ (((unsigned) &T1GCON)*8) + 7;
5575
5576 extern volatile __bit TMR1GIE @ (((unsigned) &PIE1)*8) + 7;
5577
5578 extern volatile __bit TMR1GIF @ (((unsigned) &PIR1)*8) + 7;
5579
5580 extern volatile __bit TMR1IE @ (((unsigned) &PIE1)*8) + 0;
5581
5582 extern volatile __bit TMR1IF @ (((unsigned) &PIR1)*8) + 0;
5583
5584 extern volatile __bit TMR1ON @ (((unsigned) &T1CON)*8) + 0;
5585
5586 extern volatile __bit TMR2IE @ (((unsigned) &PIE1)*8) + 1;
5587
5588 extern volatile __bit TMR2IF @ (((unsigned) &PIR1)*8) + 1;
5589
5590 extern volatile __bit TMR2ON @ (((unsigned) &T2CON)*8) + 2;
5591
5592 extern volatile __bit TRISA0 @ (((unsigned) &TRISA)*8) + 0;
5593
5594 extern volatile __bit TRISA1 @ (((unsigned) &TRISA)*8) + 1;
5595
5596 extern volatile __bit TRISA2 @ (((unsigned) &TRISA)*8) + 2;
5597
5598 extern volatile __bit TRISA3 @ (((unsigned) &TRISA)*8) + 3;
5599
5600 extern volatile __bit TRISA4 @ (((unsigned) &TRISA)*8) + 4;
5601
5602 extern volatile __bit TRISA5 @ (((unsigned) &TRISA)*8) + 5;
5603
5604 extern volatile __bit TRMT @ (((unsigned) &TXSTA)*8) + 1;
5605
5606 extern volatile __bit TSEN @ (((unsigned) &FVRCON)*8) + 5;
5607
5608 extern volatile __bit TSRNG @ (((unsigned) &FVRCON)*8) + 4;
5609
5610 extern volatile __bit TUN0 @ (((unsigned) &OSCTUNE)*8) + 0;
5611
5612 extern volatile __bit TUN1 @ (((unsigned) &OSCTUNE)*8) + 1;
5613
5614 extern volatile __bit TUN2 @ (((unsigned) &OSCTUNE)*8) + 2;
5615
5616 extern volatile __bit TUN3 @ (((unsigned) &OSCTUNE)*8) + 3;
5617
5618 extern volatile __bit TUN4 @ (((unsigned) &OSCTUNE)*8) + 4;
5619
5620 extern volatile __bit TUN5 @ (((unsigned) &OSCTUNE)*8) + 5;
5621
5622 extern volatile __bit TX9 @ (((unsigned) &TXSTA)*8) + 6;
5623
5624 extern volatile __bit TX9D @ (((unsigned) &TXSTA)*8) + 0;
5625
5626 extern volatile __bit TXCKSEL @ (((unsigned) &APFCON)*8) + 2;
5627
5628 extern volatile __bit TXEN @ (((unsigned) &TXSTA)*8) + 5;
5629
5630 extern volatile __bit TXIE @ (((unsigned) &PIE1)*8) + 4;
5631
5632 extern volatile __bit TXIF @ (((unsigned) &PIR1)*8) + 4;
5633
5634 extern volatile __bit UA @ (((unsigned) &SSP1STAT)*8) + 1;
5635
5636 extern volatile __bit VREGPM0 @ (((unsigned) &VREGCON)*8) + 0;
5637
5638 extern volatile __bit VREGPM1 @ (((unsigned) &VREGCON)*8) + 1;
5639
5640 extern volatile __bit WCOL @ (((unsigned) &SSP1CON1)*8) + 7;
5641
5642 extern volatile __bit WDTPS0 @ (((unsigned) &WDTCON)*8) + 1;
5643
5644 extern volatile __bit WDTPS1 @ (((unsigned) &WDTCON)*8) + 2;
5645
5646 extern volatile __bit WDTPS2 @ (((unsigned) &WDTCON)*8) + 3;
5647
5648 extern volatile __bit WDTPS3 @ (((unsigned) &WDTCON)*8) + 4;
5649
5650 extern volatile __bit WDTPS4 @ (((unsigned) &WDTCON)*8) + 5;
5651
5652 extern volatile __bit WPUA0 @ (((unsigned) &WPUA)*8) + 0;
5653
5654 extern volatile __bit WPUA1 @ (((unsigned) &WPUA)*8) + 1;
5655
5656 extern volatile __bit WPUA2 @ (((unsigned) &WPUA)*8) + 2;
5657
5658 extern volatile __bit WPUA3 @ (((unsigned) &WPUA)*8) + 3;
5659
5660 extern volatile __bit WPUA4 @ (((unsigned) &WPUA)*8) + 4;
5661
5662 extern volatile __bit WPUA5 @ (((unsigned) &WPUA)*8) + 5;
5663
5664 extern volatile __bit WR @ (((unsigned) &EECON1)*8) + 1;
5665
5666 extern volatile __bit WREN @ (((unsigned) &EECON1)*8) + 2;
5667
5668 extern volatile __bit WRERR @ (((unsigned) &EECON1)*8) + 3;
5669
5670 extern volatile __bit WUE @ (((unsigned) &BAUDCON)*8) + 1;
5671
5672 extern volatile __bit ZERO @ (((unsigned) &STATUS)*8) + 2;
5673
5674 extern volatile __bit Z_SHAD @ (((unsigned) &STATUS_SHAD)*8) + 2;
5675
5676 extern volatile __bit nBOR @ (((unsigned) &PCON)*8) + 0;
5677
5678 extern volatile __bit nPD @ (((unsigned) &STATUS)*8) + 3;
5679
5680 extern volatile __bit nPOR @ (((unsigned) &PCON)*8) + 1;
5681
5682 extern volatile __bit nRI @ (((unsigned) &PCON)*8) + 2;
5683
5684 extern volatile __bit nRMCLR @ (((unsigned) &PCON)*8) + 3;
5685
5686 extern volatile __bit nT1SYNC @ (((unsigned) &T1CON)*8) + 2;
5687
5688 extern volatile __bit nTO @ (((unsigned) &STATUS)*8) + 4;
5689
5690 extern volatile __bit nWPUEN @ (((unsigned) &OPTION_REG)*8) + 7;
5691
5692 # 31 "system.h"
5693 void ConfigureOscillator(void);
5694
5695 # 13 "user.h"
5696 void InitApp(void);
5697 bool msg_empty(void);
5698 void msg_write(const char *msg);
5699 void msg_writebyte(const char msg);
5700 void msg_sendnext(void);
5701 void tohex(char val[3], char i);
5702 void msg_recvnext(void);
5703 bool msg_recvready(void);
5704 char msg_recv(void);
5705 void putch(char);
5706
5707 void int_disable(void);
5708 void int_enable(void);
5709
5710 # 11 "onewire.h"
5711 bool OW_reset(void);
5712 void OW_write_bit(bool val);
5713 bool OW_read_bit();
5714 void OW_write_byte(unsigned char byte);
5715 unsigned char OW_read_byte(void);
5716
5717 void OW_search_init();
5718 bool OW_search(void);
5719 void OW_start(void);
5720
5721 void OW_identify();
5722 bool OW_parasite(void);
5723 void OW_read_block(uint8_t code, uint8_t * data, uint8_t len);
5724 void OW_convert();
5725
5726
5727 inline void drive_OW_low(void);
5728 inline void drive_OW_high(void);
5729 inline void float_OW(void);
5730 inline bool read_OW(void);
5731
5732 extern unsigned char romid[8];
5733
5734 # 27 "main.c"
5735 char outbuff[60];
5736 char * outp = 0;
5737 uint8_t outlen = 0;
5738
5739 char inbuff[10];
5740 uint8_t inlen = 0;
5741
5742 # 38
5743 char prompt[9];
5744
5745 const char * banner = "\r\n\n\nPIC 1-Wire Bridge system.  Press 'H' for help.\r\n";
5746
5747 void main(void)
5748 {
5749 prompt[0] = 'c';
5750 prompt[1] = 'm';
5751 prompt[2] = 'd';
5752 prompt[3] = ' ';
5753 prompt[4] = '?';
5754 prompt[5] = '?';
5755 prompt[6] = '>';
5756 prompt[7] = ' ';
5757 prompt[8] = 0;
5758
5759 bool usermode = 0;
5760
5761
5762 ConfigureOscillator();
5763
5764
5765 InitApp();
5766
5767 OW_start();
5768 msg_write(banner);
5769
5770
5771 while(1)
5772 {
5773 asm("clrwdt");
5774
5775 if (TRISAbits.TRISA5 == 1) {
5776 prompt[4] = 'i';
5777 prompt[5] = PORTAbits.RA5 ? '1':'0';
5778 } else {
5779 prompt[4] = 'o';
5780 prompt[5] = PORTAbits.RA5 ? '1':'0';
5781 }
5782
5783 if (!msg_empty()) continue;
5784
5785 if (!msg_recvready()) continue;
5786
5787 char cmd = msg_recv();
5788
5789 if (cmd == '\r' || cmd == '\n') {
5790 if (usermode) msg_write("\r\n");
5791 }else
5792 if (cmd == 'h' || cmd == 'H') {
5793 msg_write(banner);
5794 msg_write("\nHelp:\r\n");
5795 while (!msg_empty());
5796 msg_write("E - Enumerate the Bus\r\n");
5797 msg_write("R - Reset Bus\r\n");
5798 while (!msg_empty());
5799 msg_write("0,1,3 - bus to Low, High, Tristate\r\n");
5800 msg_write("I - Read (one) Device ID\r\n");
5801 while (!msg_empty());
5802 msg_write("P - Any device parasitic powered?\r\n");
5803 msg_write("S - Read scratchpad memory\r\n");
5804 while (!msg_empty());
5805 msg_write("T - read temperature of all devices\r\n");
5806 usermode = 1;
5807 } else
5808 if (cmd == 'r' || cmd == 'R') {
5809 int_disable();
5810 bool present = OW_reset();
5811 int_enable();
5812 if (usermode) msg_write("\r");
5813 if (present)
5814 msg_write("RESET Device detected.\r\n");
5815 else
5816 msg_write("RESET No Devices detected.\r\n");
5817 } else
5818 if (cmd == 'e' || cmd == 'E')
5819 {
5820 char count = 0;
5821 if (usermode) msg_write("\r");
5822 OW_search_init();
5823 while (OW_search())
5824 {
5825 char val[3];
5826 if (usermode) msg_write("ENUM ");
5827 for (char j=0; j<8; j++) {
5828 tohex(val, romid[j]);
5829 msg_write(val);
5830 }
5831 if (usermode) msg_write("\r\n"); else msg_write("\n");
5832 count++;
5833 }
5834 if (usermode) {
5835 if (count==0) msg_write("ERROR No devices found\r\n");
5836 } else {
5837 msg_write("END\n");
5838 }
5839 }else
5840 if (cmd == 'i' || cmd == 'I') {
5841 OW_identify();
5842 char val[3];
5843 if (usermode) msg_write("\rID ");
5844 for (char j=0; j<8; j++) {
5845 tohex(val, romid[j]);
5846 msg_write(val);
5847 }
5848 if (usermode) msg_write("\r\n"); else msg_write("\n");
5849 }else
5850 if (cmd == 'p' || cmd == 'P') {
5851 if (usermode) msg_write("\r");
5852 bool para = OW_parasite();
5853 if (usermode) {
5854 if (para)
5855 msg_write("PARA A Device is parasite powered\r\n");
5856 else
5857 msg_write("PARA No Device is parasite powered.\r\n");
5858 } else {
5859 if (para) msg_write("PARA\n"); else msg_write("DIRECT\n");
5860 }
5861 }else
5862 if (cmd == 's' || cmd =='S') {
5863 uint8_t scratch[9];
5864 romid[0] = 0;
5865 OW_read_block(0xBE, scratch, 9);
5866 if (usermode) msg_write("\rSCRATCH");
5867 for (char j=0; j<9; j++) {
5868 char val[3];
5869 tohex(val, scratch[j]);
5870 msg_write(" ");
5871 msg_write(val);
5872 }
5873 if (usermode) msg_write("\r\n"); else msg_write("\n");
5874 }else
5875 if (cmd == 't' || cmd == 'T') {
5876 char val[3];
5877 uint8_t scratch[9];
5878
5879 # 178
5880 OW_search_init();
5881 while (OW_search())
5882 {
5883
5884 asm("clrwdt");
5885
5886 OW_convert();
5887 asm("clrwdt");
5888
5889
5890 for (char j=0; j<9; j++) scratch[j]=0;
5891
5892
5893 OW_read_block(0xBE, scratch, 9);
5894
5895
5896 if (usermode) msg_write("\r");
5897 msg_write("TEMP ");
5898 for (char j=0;j<8;j++) {
5899 tohex(val, romid[j]);
5900 msg_write(val);
5901 }
5902 msg_write(" ");
5903 tohex(val, scratch[1]);
5904 msg_write(val);
5905 tohex(val, scratch[0]);
5906 msg_write(val);
5907 if (usermode) msg_write("\r\n"); else msg_write("\n");
5908 }
5909
5910 if (!usermode) msg_write("END\n");
5911
5912 }else
5913 if (cmd == '0')
5914 {
5915 drive_OW_low();
5916 if (usermode)
5917 msg_write("\rBUS 1-Wire set low\r\n");
5918 else
5919 msg_write("LOW\n");
5920 }else
5921 if (cmd == '1')
5922 {
5923 drive_OW_high();
5924 if (usermode)
5925 msg_write("\rBUS 1-wire set high\r\n");
5926 else
5927 msg_write("HIGH\n");
5928 }else
5929 if (cmd == '3')
5930 {
5931 float_OW();
5932 if (usermode)
5933 msg_write("\rBUS 1-wire set to tri-state\r\n");
5934 else
5935 msg_write("TRISTATE\n");
5936 }else
5937 if (cmd == '!')
5938 {
5939
5940 msg_write("Play dead.\r\n");
5941 while (1) { _nop(); }
5942 }else
5943 if (cmd == '?')
5944 {
5945 bool line = read_OW();
5946 if (line) {
5947 if (usermode) msg_write("\rBUS HIGH\r\n");
5948 else
5949 msg_write("HIGH\n");
5950 } else {
5951 if (usermode) msg_write("\rBUS LOW\r\n");
5952 else msg_write("LOW\n");
5953 }
5954 }else
5955 {
5956 if (usermode) {
5957 msg_write("ERROR Press H for Help\n");
5958 } else {
5959 msg_write("\rERROR Unknown command '");
5960 msg_writebyte(cmd);
5961 msg_write("' Press 'H' for help.\r\n");
5962 }
5963 }
5964
5965 if (usermode) msg_write(prompt);
5966 }
5967 }
5968
5969 # 269
5970 void tohex(char val[], char i)
5971 {
5972 char bt = i >> 4;
5973 if (bt > 9)
5974 val[0] = 'A' + (bt - 10);
5975 else
5976 val[0] = '0' + bt;
5977 bt = i & 0x0F;
5978 if (bt > 9)
5979 val[1] = 'A' + (bt - 10);
5980 else
5981 val[1] = '0' + bt;
5982 val[2] = 0;
5983 }
5984
5985
5986
5987 bool msg_empty(void)
5988 {
5989 if (outp == 0) return 1;
5990 return 0;
5991 }
5992
5993
5994 void msg_write(const char *msg)
5995 {
5996 char * p = outbuff + outlen;
5997 while (outlen < sizeof(outbuff) && *msg != 0) {
5998 *(p++) = *(msg++);
5999 outlen++;
6000 }
6001 *p = 0;
6002 if (outp == 0) {
6003 outp = outbuff;
6004 PIE1bits.TXIE = 1;
6005 }
6006 }
6007
6008 void msg_writebyte(const char msg)
6009 {
6010 if (outlen+1 >= (uint8_t)sizeof(outbuff)) return;
6011 outbuff[outlen++] = msg;
6012 outbuff[outlen] = 0;
6013 if (outp == 0) {
6014 outp = outbuff;
6015 PIE1bits.TXIE = 1;
6016 }
6017 }
6018
6019 void putch(char data)
6020 {
6021 msg_writebyte(data);
6022 }
6023
6024
6025 void msg_sendnext(void)
6026 {
6027
6028 if (outp == 0 || *outp == 0) {
6029 PIE1bits.TXIE = 0;
6030 outp = 0;
6031 outlen = 0;
6032 return;
6033 }
6034 TXREG = *outp;
6035 outp++;
6036 }
6037
6038
6039 void msg_recvnext(void)
6040 {
6041 while (PIR1bits.RCIF) {
6042 bool err = RCSTAbits.FERR;
6043 char new = RCREG;
6044
6045
6046 if (err) continue;
6047
6048
6049 if (inlen > sizeof(inbuff)) return;
6050
6051
6052 inbuff[inlen++] = new;
6053 }
6054 }
6055
6056 bool msg_recvready(void)
6057 {
6058 if (inlen > 0) return 1;
6059 return 0;
6060 }
6061
6062 char msg_recv(void)
6063 {
6064 if (inlen == 0) return 0;
6065
6066
6067 bool in = PIE1bits.RCIE;
6068 PIE1bits.RCIE = 0;
6069
6070 char new = inbuff[0];
6071 inlen--;
6072
6073
6074 for (char i=0;i<inlen;i++)
6075 inbuff[i] = inbuff[i+1];
6076
6077
6078 PIE1bits.RCIE = in;
6079 return new;
6080 }
6081
6082
6083 void int_disable(void)
6084 {
6085 INTCONbits.GIE = 0;
6086 }
6087
6088 void int_enable(void)
6089 {
6090 INTCONbits.GIE = 1;
6091 }