-
Notifications
You must be signed in to change notification settings - Fork 0
/
p30F5011.h
9769 lines (9149 loc) · 348 KB
/
p30F5011.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*-------------------------------------------------------------------------
* MPLAB-Cxx dsPIC30F5011 processor header
*
* (c) Copyright 1999-2011 Microchip Technology, All rights reserved
*-------------------------------------------------------------------------*/
#ifndef __dsPIC30F5011__
#error "Include file does not match processor setting"
#endif
#ifndef __30F5011_H
#define __30F5011_H
extern volatile unsigned int WREG0 __attribute__((__sfr__,__deprecated__,__unsafe__));
extern volatile unsigned int WREG1 __attribute__((__sfr__,__deprecated__,__unsafe__));
extern volatile unsigned int WREG2 __attribute__((__sfr__,__deprecated__,__unsafe__));
extern volatile unsigned int WREG3 __attribute__((__sfr__,__deprecated__,__unsafe__));
extern volatile unsigned int WREG4 __attribute__((__sfr__,__deprecated__,__unsafe__));
extern volatile unsigned int WREG5 __attribute__((__sfr__,__deprecated__,__unsafe__));
extern volatile unsigned int WREG6 __attribute__((__sfr__,__deprecated__,__unsafe__));
extern volatile unsigned int WREG7 __attribute__((__sfr__,__deprecated__,__unsafe__));
extern volatile unsigned int WREG8 __attribute__((__sfr__,__deprecated__,__unsafe__));
extern volatile unsigned int WREG9 __attribute__((__sfr__,__deprecated__,__unsafe__));
extern volatile unsigned int WREG10 __attribute__((__sfr__,__deprecated__,__unsafe__));
extern volatile unsigned int WREG11 __attribute__((__sfr__,__deprecated__,__unsafe__));
extern volatile unsigned int WREG12 __attribute__((__sfr__,__deprecated__,__unsafe__));
extern volatile unsigned int WREG13 __attribute__((__sfr__,__deprecated__,__unsafe__));
extern volatile unsigned int WREG14 __attribute__((__sfr__,__deprecated__,__unsafe__));
extern volatile unsigned int WREG15 __attribute__((__sfr__,__deprecated__,__unsafe__));
extern volatile unsigned int SPLIM __attribute__((__sfr__));
typedef struct tagACC {
unsigned int L;
unsigned int H;
unsigned char U;
} ACC;
/* SFR blocks for each ACC module */
extern volatile ACC ACCA __attribute__((__sfr__));
extern volatile unsigned int ACCAL __attribute__((__sfr__));
extern volatile unsigned int ACCAH __attribute__((__sfr__));
extern volatile unsigned char ACCAU __attribute__((__sfr__));
/* SFR blocks for each ACC module */
extern volatile ACC ACCB __attribute__((__sfr__));
extern volatile unsigned int ACCBL __attribute__((__sfr__));
extern volatile unsigned int ACCBH __attribute__((__sfr__));
extern volatile unsigned char ACCBU __attribute__((__sfr__));
extern volatile unsigned int PCL __attribute__((__sfr__));
extern volatile unsigned char PCH __attribute__((__sfr__));
extern volatile unsigned char TBLPAG __attribute__((__sfr__));
extern volatile unsigned char PSVPAG __attribute__((__sfr__));
extern volatile unsigned int RCOUNT __attribute__((__sfr__));
extern volatile unsigned int DCOUNT __attribute__((__sfr__));
extern volatile unsigned int DOSTARTL __attribute__((__sfr__));
extern volatile unsigned int DOSTARTH __attribute__((__sfr__));
extern volatile unsigned int DOENDL __attribute__((__sfr__));
extern volatile unsigned int DOENDH __attribute__((__sfr__));
extern volatile unsigned int SR __attribute__((__sfr__));
__extension__ typedef struct tagSRBITS {
union {
struct {
unsigned C:1;
unsigned Z:1;
unsigned OV:1;
unsigned N:1;
unsigned RA:1;
unsigned IPL:3;
unsigned DC:1;
unsigned DA:1;
unsigned SAB:1;
unsigned OAB:1;
unsigned SB:1;
unsigned SA:1;
unsigned OB:1;
unsigned OA:1;
};
struct {
unsigned :5;
unsigned IPL0:1;
unsigned IPL1:1;
unsigned IPL2:1;
};
};
} SRBITS;
extern volatile SRBITS SRbits __attribute__((__sfr__));
extern volatile unsigned int CORCON __attribute__((__sfr__));
__extension__ typedef struct tagCORCONBITS {
union {
struct {
unsigned IF:1;
unsigned RND:1;
unsigned PSV:1;
unsigned IPL3:1;
unsigned ACCSAT:1;
unsigned SATDW:1;
unsigned SATB:1;
unsigned SATA:1;
unsigned DL:3;
unsigned EDT:1;
unsigned US:1;
};
struct {
unsigned :8;
unsigned DL0:1;
unsigned DL1:1;
unsigned DL2:1;
};
};
} CORCONBITS;
extern volatile CORCONBITS CORCONbits __attribute__((__sfr__));
extern volatile unsigned int MODCON __attribute__((__sfr__));
__extension__ typedef struct tagMODCONBITS {
union {
struct {
unsigned XWM:4;
unsigned YWM:4;
unsigned BWM:4;
unsigned :2;
unsigned YMODEN:1;
unsigned XMODEN:1;
};
struct {
unsigned XWM0:1;
unsigned XWM1:1;
unsigned XWM2:1;
unsigned XWM3:1;
unsigned YWM0:1;
unsigned YWM1:1;
unsigned YWM2:1;
unsigned YWM3:1;
unsigned BWM0:1;
unsigned BWM1:1;
unsigned BWM2:1;
unsigned BWM3:1;
};
};
} MODCONBITS;
extern volatile MODCONBITS MODCONbits __attribute__((__sfr__));
extern volatile unsigned int XMODSRT __attribute__((__sfr__));
extern volatile unsigned int XMODEND __attribute__((__sfr__));
extern volatile unsigned int YMODSRT __attribute__((__sfr__));
extern volatile unsigned int YMODEND __attribute__((__sfr__));
extern volatile unsigned int XBREV __attribute__((__sfr__));
__extension__ typedef struct tagXBREVBITS {
union {
struct {
unsigned XB:15;
unsigned BREN:1;
};
struct {
unsigned XB0:1;
unsigned XB1:1;
unsigned XB2:1;
unsigned XB3:1;
unsigned XB4:1;
unsigned XB5:1;
unsigned XB6:1;
unsigned XB7:1;
unsigned XB8:1;
unsigned XB9:1;
unsigned XB10:1;
unsigned XB11:1;
unsigned XB12:1;
unsigned XB13:1;
unsigned XB14:1;
};
};
} XBREVBITS;
extern volatile XBREVBITS XBREVbits __attribute__((__sfr__));
extern volatile unsigned int DISICNT __attribute__((__sfr__));
typedef struct tagDISICNTBITS {
unsigned DISICNT:14;
} DISICNTBITS;
extern volatile DISICNTBITS DISICNTbits __attribute__((__sfr__));
extern volatile unsigned int INTCON1 __attribute__((__sfr__));
typedef struct tagINTCON1BITS {
unsigned :1;
unsigned OSCFAIL:1;
unsigned STKERR:1;
unsigned ADDRERR:1;
unsigned MATHERR:1;
unsigned :3;
unsigned COVTE:1;
unsigned OVBTE:1;
unsigned OVATE:1;
unsigned :4;
unsigned NSTDIS:1;
} INTCON1BITS;
extern volatile INTCON1BITS INTCON1bits __attribute__((__sfr__));
extern volatile unsigned int INTCON2 __attribute__((__sfr__));
typedef struct tagINTCON2BITS {
unsigned INT0EP:1;
unsigned INT1EP:1;
unsigned INT2EP:1;
unsigned INT3EP:1;
unsigned INT4EP:1;
unsigned :9;
unsigned DISI:1;
unsigned ALTIVT:1;
} INTCON2BITS;
extern volatile INTCON2BITS INTCON2bits __attribute__((__sfr__));
extern volatile unsigned int IFS0 __attribute__((__sfr__));
typedef struct tagIFS0BITS {
unsigned INT0IF:1;
unsigned IC1IF:1;
unsigned OC1IF:1;
unsigned T1IF:1;
unsigned IC2IF:1;
unsigned OC2IF:1;
unsigned T2IF:1;
unsigned T3IF:1;
unsigned SPI1IF:1;
unsigned U1RXIF:1;
unsigned U1TXIF:1;
unsigned ADIF:1;
unsigned NVMIF:1;
unsigned SI2CIF:1;
unsigned MI2CIF:1;
unsigned CNIF:1;
} IFS0BITS;
extern volatile IFS0BITS IFS0bits __attribute__((__sfr__));
extern volatile unsigned int IFS1 __attribute__((__sfr__));
typedef struct tagIFS1BITS {
unsigned INT1IF:1;
unsigned IC7IF:1;
unsigned IC8IF:1;
unsigned OC3IF:1;
unsigned OC4IF:1;
unsigned T4IF:1;
unsigned T5IF:1;
unsigned INT2IF:1;
unsigned U2RXIF:1;
unsigned U2TXIF:1;
unsigned SPI2IF:1;
unsigned C1IF:1;
unsigned IC3IF:1;
unsigned IC4IF:1;
unsigned IC5IF:1;
unsigned IC6IF:1;
} IFS1BITS;
extern volatile IFS1BITS IFS1bits __attribute__((__sfr__));
extern volatile unsigned int IFS2 __attribute__((__sfr__));
typedef struct tagIFS2BITS {
unsigned OC5IF:1;
unsigned OC6IF:1;
unsigned OC7IF:1;
unsigned OC8IF:1;
unsigned INT3IF:1;
unsigned INT4IF:1;
unsigned C2IF:1;
unsigned :2;
unsigned DCIIF:1;
unsigned LVDIF:1;
} IFS2BITS;
extern volatile IFS2BITS IFS2bits __attribute__((__sfr__));
extern volatile unsigned int IEC0 __attribute__((__sfr__));
typedef struct tagIEC0BITS {
unsigned INT0IE:1;
unsigned IC1IE:1;
unsigned OC1IE:1;
unsigned T1IE:1;
unsigned IC2IE:1;
unsigned OC2IE:1;
unsigned T2IE:1;
unsigned T3IE:1;
unsigned SPI1IE:1;
unsigned U1RXIE:1;
unsigned U1TXIE:1;
unsigned ADIE:1;
unsigned NVMIE:1;
unsigned SI2CIE:1;
unsigned MI2CIE:1;
unsigned CNIE:1;
} IEC0BITS;
extern volatile IEC0BITS IEC0bits __attribute__((__sfr__));
extern volatile unsigned int IEC1 __attribute__((__sfr__));
typedef struct tagIEC1BITS {
unsigned INT1IE:1;
unsigned IC7IE:1;
unsigned IC8IE:1;
unsigned OC3IE:1;
unsigned OC4IE:1;
unsigned T4IE:1;
unsigned T5IE:1;
unsigned INT2IE:1;
unsigned U2RXIE:1;
unsigned U2TXIE:1;
unsigned SPI2IE:1;
unsigned C1IE:1;
unsigned IC3IE:1;
unsigned IC4IE:1;
unsigned IC5IE:1;
unsigned IC6IE:1;
} IEC1BITS;
extern volatile IEC1BITS IEC1bits __attribute__((__sfr__));
extern volatile unsigned int IEC2 __attribute__((__sfr__));
typedef struct tagIEC2BITS {
unsigned OC5IE:1;
unsigned OC6IE:1;
unsigned OC7IE:1;
unsigned OC8IE:1;
unsigned INT3IE:1;
unsigned INT4IE:1;
unsigned C2IE:1;
unsigned :2;
unsigned DCIIE:1;
unsigned LVDIE:1;
} IEC2BITS;
extern volatile IEC2BITS IEC2bits __attribute__((__sfr__));
extern volatile unsigned int IPC0 __attribute__((__sfr__));
__extension__ typedef struct tagIPC0BITS {
union {
struct {
unsigned INT0IP:3;
unsigned :1;
unsigned IC1IP:3;
unsigned :1;
unsigned OC1IP:3;
unsigned :1;
unsigned T1IP:3;
};
struct {
unsigned INT0IP0:1;
unsigned INT0IP1:1;
unsigned INT0IP2:1;
unsigned :1;
unsigned IC1IP0:1;
unsigned IC1IP1:1;
unsigned IC1IP2:1;
unsigned :1;
unsigned OC1IP0:1;
unsigned OC1IP1:1;
unsigned OC1IP2:1;
unsigned :1;
unsigned T1IP0:1;
unsigned T1IP1:1;
unsigned T1IP2:1;
};
};
} IPC0BITS;
extern volatile IPC0BITS IPC0bits __attribute__((__sfr__));
extern volatile unsigned int IPC1 __attribute__((__sfr__));
__extension__ typedef struct tagIPC1BITS {
union {
struct {
unsigned IC2IP:3;
unsigned :1;
unsigned OC2IP:3;
unsigned :1;
unsigned T2IP:3;
unsigned :1;
unsigned T3IP:3;
};
struct {
unsigned IC2IP0:1;
unsigned IC2IP1:1;
unsigned IC2IP2:1;
unsigned :1;
unsigned OC2IP0:1;
unsigned OC2IP1:1;
unsigned OC2IP2:1;
unsigned :1;
unsigned T2IP0:1;
unsigned T2IP1:1;
unsigned T2IP2:1;
unsigned :1;
unsigned T3IP0:1;
unsigned T3IP1:1;
unsigned T3IP2:1;
};
};
} IPC1BITS;
extern volatile IPC1BITS IPC1bits __attribute__((__sfr__));
extern volatile unsigned int IPC2 __attribute__((__sfr__));
__extension__ typedef struct tagIPC2BITS {
union {
struct {
unsigned SPI1IP:3;
unsigned :1;
unsigned U1RXIP:3;
unsigned :1;
unsigned U1TXIP:3;
unsigned :1;
unsigned ADIP:3;
};
struct {
unsigned SPI1IP0:1;
unsigned SPI1IP1:1;
unsigned SPI1IP2:1;
unsigned :1;
unsigned U1RXIP0:1;
unsigned U1RXIP1:1;
unsigned U1RXIP2:1;
unsigned :1;
unsigned U1TXIP0:1;
unsigned U1TXIP1:1;
unsigned U1TXIP2:1;
unsigned :1;
unsigned ADIP0:1;
unsigned ADIP1:1;
unsigned ADIP2:1;
};
};
} IPC2BITS;
extern volatile IPC2BITS IPC2bits __attribute__((__sfr__));
extern volatile unsigned int IPC3 __attribute__((__sfr__));
__extension__ typedef struct tagIPC3BITS {
union {
struct {
unsigned NVMIP:3;
unsigned :1;
unsigned SI2CIP:3;
unsigned :1;
unsigned MI2CIP:3;
unsigned :1;
unsigned CNIP:3;
};
struct {
unsigned NVMIP0:1;
unsigned NVMIP1:1;
unsigned NVMIP2:1;
unsigned :1;
unsigned SI2CIP0:1;
unsigned SI2CIP1:1;
unsigned SI2CIP2:1;
unsigned :1;
unsigned MI2CIP0:1;
unsigned MI2CIP1:1;
unsigned MI2CIP2:1;
unsigned :1;
unsigned CNIP0:1;
unsigned CNIP1:1;
unsigned CNIP2:1;
};
};
} IPC3BITS;
extern volatile IPC3BITS IPC3bits __attribute__((__sfr__));
extern volatile unsigned int IPC4 __attribute__((__sfr__));
__extension__ typedef struct tagIPC4BITS {
union {
struct {
unsigned INT1IP:3;
unsigned :1;
unsigned IC7IP:3;
unsigned :1;
unsigned IC8IP:3;
unsigned :1;
unsigned OC3IP:3;
};
struct {
unsigned INT1IP0:1;
unsigned INT1IP1:1;
unsigned INT1IP2:1;
unsigned :1;
unsigned IC7IP0:1;
unsigned IC7IP1:1;
unsigned IC7IP2:1;
unsigned :1;
unsigned IC8IP0:1;
unsigned IC8IP1:1;
unsigned IC8IP2:1;
unsigned :1;
unsigned OC3IP0:1;
unsigned OC3IP1:1;
unsigned OC3IP2:1;
};
};
} IPC4BITS;
extern volatile IPC4BITS IPC4bits __attribute__((__sfr__));
extern volatile unsigned int IPC5 __attribute__((__sfr__));
__extension__ typedef struct tagIPC5BITS {
union {
struct {
unsigned OC4IP:3;
unsigned :1;
unsigned T4IP:3;
unsigned :1;
unsigned T5IP:3;
unsigned :1;
unsigned INT2IP:3;
};
struct {
unsigned OC4IP0:1;
unsigned OC4IP1:1;
unsigned OC4IP2:1;
unsigned :1;
unsigned T4IP0:1;
unsigned T4IP1:1;
unsigned T4IP2:1;
unsigned :1;
unsigned T5IP0:1;
unsigned T5IP1:1;
unsigned T5IP2:1;
unsigned :1;
unsigned INT2IP0:1;
unsigned INT2IP1:1;
unsigned INT2IP2:1;
};
};
} IPC5BITS;
extern volatile IPC5BITS IPC5bits __attribute__((__sfr__));
extern volatile unsigned int IPC6 __attribute__((__sfr__));
__extension__ typedef struct tagIPC6BITS {
union {
struct {
unsigned U2RXIP:3;
unsigned :1;
unsigned U2TXIP:3;
unsigned :1;
unsigned SPI2IP:3;
unsigned :1;
unsigned C1IP:3;
};
struct {
unsigned U2RXIP0:1;
unsigned U2RXIP1:1;
unsigned U2RXIP2:1;
unsigned :1;
unsigned U2TXIP0:1;
unsigned U2TXIP1:1;
unsigned U2TXIP2:1;
unsigned :1;
unsigned SPI2IP0:1;
unsigned SPI2IP1:1;
unsigned SPI2IP2:1;
unsigned :1;
unsigned C1IP0:1;
unsigned C1IP1:1;
unsigned C1IP2:1;
};
};
} IPC6BITS;
extern volatile IPC6BITS IPC6bits __attribute__((__sfr__));
extern volatile unsigned int IPC7 __attribute__((__sfr__));
__extension__ typedef struct tagIPC7BITS {
union {
struct {
unsigned IC3IP:3;
unsigned :1;
unsigned IC4IP:3;
unsigned :1;
unsigned IC5IP:3;
unsigned :1;
unsigned IC6IP:3;
};
struct {
unsigned IC3IP0:1;
unsigned IC3IP1:1;
unsigned IC3IP2:1;
unsigned :1;
unsigned IC4IP0:1;
unsigned IC4IP1:1;
unsigned IC4IP2:1;
unsigned :1;
unsigned IC5IP0:1;
unsigned IC5IP1:1;
unsigned IC5IP2:1;
unsigned :1;
unsigned IC6IP0:1;
unsigned IC6IP1:1;
unsigned IC6IP2:1;
};
};
} IPC7BITS;
extern volatile IPC7BITS IPC7bits __attribute__((__sfr__));
extern volatile unsigned int IPC8 __attribute__((__sfr__));
__extension__ typedef struct tagIPC8BITS {
union {
struct {
unsigned OC5IP:3;
unsigned :1;
unsigned OC6IP:3;
unsigned :1;
unsigned OC7IP:3;
unsigned :1;
unsigned OC8IP:3;
};
struct {
unsigned OC5IP0:1;
unsigned OC5IP1:1;
unsigned OC5IP2:1;
unsigned :1;
unsigned OC6IP0:1;
unsigned OC6IP1:1;
unsigned OC6IP2:1;
unsigned :1;
unsigned OC7IP0:1;
unsigned OC7IP1:1;
unsigned OC7IP2:1;
unsigned :1;
unsigned OC8IP0:1;
unsigned OC8IP1:1;
unsigned OC8IP2:1;
};
};
} IPC8BITS;
extern volatile IPC8BITS IPC8bits __attribute__((__sfr__));
extern volatile unsigned int IPC9 __attribute__((__sfr__));
__extension__ typedef struct tagIPC9BITS {
union {
struct {
unsigned INT3IP:3;
unsigned :1;
unsigned INT4IP:3;
unsigned :1;
unsigned C2IP:3;
};
struct {
unsigned INT3IP0:1;
unsigned INT3IP1:1;
unsigned INT3IP2:1;
unsigned :1;
unsigned INT4IP0:1;
unsigned INT4IP1:1;
unsigned INT4IP2:1;
unsigned :1;
unsigned C2IP0:1;
unsigned C2IP1:1;
unsigned C2IP2:1;
};
};
} IPC9BITS;
extern volatile IPC9BITS IPC9bits __attribute__((__sfr__));
extern volatile unsigned int IPC10 __attribute__((__sfr__));
__extension__ typedef struct tagIPC10BITS {
union {
struct {
unsigned :4;
unsigned DCIIP:3;
unsigned :1;
unsigned LVDIP:3;
};
struct {
unsigned :4;
unsigned DCIIP0:1;
unsigned DCIIP1:1;
unsigned DCIIP2:1;
unsigned :1;
unsigned LVDIP0:1;
unsigned LVDIP1:1;
unsigned LVDIP2:1;
};
};
} IPC10BITS;
extern volatile IPC10BITS IPC10bits __attribute__((__sfr__));
extern volatile unsigned int INTTREG __attribute__((__sfr__));
__extension__ typedef struct tagINTTREGBITS {
union {
struct {
unsigned VECNUM:6;
unsigned :2;
unsigned ILR:4;
unsigned :1;
unsigned VHOLD:1;
unsigned TMODE:1;
unsigned IRQTOCPU:1;
};
struct {
unsigned VECNUM0:1;
unsigned VECNUM1:1;
unsigned VECNUM2:1;
unsigned VECNUM3:1;
unsigned VECNUM4:1;
unsigned VECNUM5:1;
unsigned :2;
unsigned ILR0:1;
unsigned ILR1:1;
unsigned ILR2:1;
unsigned ILR3:1;
};
};
} INTTREGBITS;
extern volatile INTTREGBITS INTTREGbits __attribute__((__sfr__));
extern volatile unsigned int CNEN1 __attribute__((__sfr__));
typedef struct tagCNEN1BITS {
unsigned CN0IE:1;
unsigned CN1IE:1;
unsigned CN2IE:1;
unsigned CN3IE:1;
unsigned CN4IE:1;
unsigned CN5IE:1;
unsigned CN6IE:1;
unsigned CN7IE:1;
unsigned CN8IE:1;
unsigned CN9IE:1;
unsigned CN10IE:1;
unsigned CN11IE:1;
unsigned CN12IE:1;
unsigned CN13IE:1;
unsigned CN14IE:1;
unsigned CN15IE:1;
} CNEN1BITS;
extern volatile CNEN1BITS CNEN1bits __attribute__((__sfr__));
extern volatile unsigned int CNEN2 __attribute__((__sfr__));
typedef struct tagCNEN2BITS {
unsigned CN16IE:1;
unsigned CN17IE:1;
unsigned CN18IE:1;
} CNEN2BITS;
extern volatile CNEN2BITS CNEN2bits __attribute__((__sfr__));
extern volatile unsigned int CNPU1 __attribute__((__sfr__));
typedef struct tagCNPU1BITS {
unsigned CN0PUE:1;
unsigned CN1PUE:1;
unsigned CN2PUE:1;
unsigned CN3PUE:1;
unsigned CN4PUE:1;
unsigned CN5PUE:1;
unsigned CN6PUE:1;
unsigned CN7PUE:1;
unsigned CN8PUE:1;
unsigned CN9PUE:1;
unsigned CN10PUE:1;
unsigned CN11PUE:1;
unsigned CN12PUE:1;
unsigned CN13PUE:1;
unsigned CN14PUE:1;
unsigned CN15PUE:1;
} CNPU1BITS;
extern volatile CNPU1BITS CNPU1bits __attribute__((__sfr__));
extern volatile unsigned int CNPU2 __attribute__((__sfr__));
typedef struct tagCNPU2BITS {
unsigned CN16PUE:1;
unsigned CN17PUE:1;
unsigned CN18PUE:1;
} CNPU2BITS;
extern volatile CNPU2BITS CNPU2bits __attribute__((__sfr__));
extern volatile unsigned int TMR1 __attribute__((__sfr__));
extern volatile unsigned int PR1 __attribute__((__sfr__));
extern volatile unsigned int T1CON __attribute__((__sfr__));
__extension__ typedef struct tagT1CONBITS {
union {
struct {
unsigned :1;
unsigned TCS:1;
unsigned TSYNC:1;
unsigned :1;
unsigned TCKPS:2;
unsigned TGATE:1;
unsigned :6;
unsigned TSIDL:1;
unsigned :1;
unsigned TON:1;
};
struct {
unsigned :4;
unsigned TCKPS0:1;
unsigned TCKPS1:1;
};
};
} T1CONBITS;
extern volatile T1CONBITS T1CONbits __attribute__((__sfr__));
extern volatile unsigned int TMR2 __attribute__((__sfr__));
extern volatile unsigned int TMR3HLD __attribute__((__sfr__));
extern volatile unsigned int TMR3 __attribute__((__sfr__));
extern volatile unsigned int PR2 __attribute__((__sfr__));
extern volatile unsigned int PR3 __attribute__((__sfr__));
extern volatile unsigned int T2CON __attribute__((__sfr__));
__extension__ typedef struct tagT2CONBITS {
union {
struct {
unsigned :1;
unsigned TCS:1;
unsigned :1;
unsigned T32:1;
unsigned TCKPS:2;
unsigned TGATE:1;
unsigned :6;
unsigned TSIDL:1;
unsigned :1;
unsigned TON:1;
};
struct {
unsigned :4;
unsigned TCKPS0:1;
unsigned TCKPS1:1;
};
};
} T2CONBITS;
extern volatile T2CONBITS T2CONbits __attribute__((__sfr__));
extern volatile unsigned int T3CON __attribute__((__sfr__));
__extension__ typedef struct tagT3CONBITS {
union {
struct {
unsigned :1;
unsigned TCS:1;
unsigned :2;
unsigned TCKPS:2;
unsigned TGATE:1;
unsigned :6;
unsigned TSIDL:1;
unsigned :1;
unsigned TON:1;
};
struct {
unsigned :4;
unsigned TCKPS0:1;
unsigned TCKPS1:1;
};
};
} T3CONBITS;
extern volatile T3CONBITS T3CONbits __attribute__((__sfr__));
extern volatile unsigned int TMR4 __attribute__((__sfr__));
extern volatile unsigned int TMR5HLD __attribute__((__sfr__));
extern volatile unsigned int TMR5 __attribute__((__sfr__));
extern volatile unsigned int PR4 __attribute__((__sfr__));
extern volatile unsigned int PR5 __attribute__((__sfr__));
extern volatile unsigned int T4CON __attribute__((__sfr__));
__extension__ typedef struct tagT4CONBITS {
union {
struct {
unsigned :1;
unsigned TCS:1;
unsigned :1;
unsigned T32:1;
unsigned TCKPS:2;
unsigned TGATE:1;
unsigned :6;
unsigned TSIDL:1;
unsigned :1;
unsigned TON:1;
};
struct {
unsigned :4;
unsigned TCKPS0:1;
unsigned TCKPS1:1;
};
};
} T4CONBITS;
extern volatile T4CONBITS T4CONbits __attribute__((__sfr__));
extern volatile unsigned int T5CON __attribute__((__sfr__));
__extension__ typedef struct tagT5CONBITS {
union {
struct {
unsigned :1;
unsigned TCS:1;
unsigned :2;
unsigned TCKPS:2;
unsigned TGATE:1;
unsigned :6;
unsigned TSIDL:1;
unsigned :1;
unsigned TON:1;
};
struct {
unsigned :4;
unsigned TCKPS0:1;
unsigned TCKPS1:1;
};
};
} T5CONBITS;
extern volatile T5CONBITS T5CONbits __attribute__((__sfr__));
/* Generic structure of entire SFR area for Input Capture modules */
typedef struct tagIC {
unsigned int icxbuf;
unsigned int icxcon;
} IC, *PIC;
/* SFR blocks for Input Capture modules */
extern volatile IC IC1 __attribute__((__sfr__));
extern volatile unsigned int IC1BUF __attribute__((__sfr__));
extern volatile unsigned int IC1CON __attribute__((__sfr__));
__extension__ typedef struct tagIC1CONBITS {
union {
struct {
unsigned ICM:3;
unsigned ICBNE:1;
unsigned ICOV:1;
unsigned ICI:2;
unsigned ICTMR:1;
unsigned :5;
unsigned ICSIDL:1;
};
struct {
unsigned ICM0:1;
unsigned ICM1:1;
unsigned ICM2:1;
unsigned :2;
unsigned ICI0:1;
unsigned ICI1:1;
};
};
} IC1CONBITS;
extern volatile IC1CONBITS IC1CONbits __attribute__((__sfr__));
/* SFR blocks for Input Capture modules */
extern volatile IC IC2 __attribute__((__sfr__));
extern volatile unsigned int IC2BUF __attribute__((__sfr__));
extern volatile unsigned int IC2CON __attribute__((__sfr__));
__extension__ typedef struct tagIC2CONBITS {
union {
struct {
unsigned ICM:3;
unsigned ICBNE:1;
unsigned ICOV:1;
unsigned ICI:2;
unsigned ICTMR:1;
unsigned :5;
unsigned ICSIDL:1;
};
struct {
unsigned ICM0:1;
unsigned ICM1:1;
unsigned ICM2:1;
unsigned :2;
unsigned ICI0:1;
unsigned ICI1:1;
};
};
} IC2CONBITS;
extern volatile IC2CONBITS IC2CONbits __attribute__((__sfr__));
/* SFR blocks for Input Capture modules */
extern volatile IC IC3 __attribute__((__sfr__));
extern volatile unsigned int IC3BUF __attribute__((__sfr__));
extern volatile unsigned int IC3CON __attribute__((__sfr__));
__extension__ typedef struct tagIC3CONBITS {
union {
struct {
unsigned ICM:3;
unsigned ICBNE:1;
unsigned ICOV:1;
unsigned ICI:2;
unsigned ICTMR:1;
unsigned :5;
unsigned ICSIDL:1;
};
struct {
unsigned ICM0:1;
unsigned ICM1:1;
unsigned ICM2:1;
unsigned :2;
unsigned ICI0:1;
unsigned ICI1:1;
};
};
} IC3CONBITS;
extern volatile IC3CONBITS IC3CONbits __attribute__((__sfr__));
/* SFR blocks for Input Capture modules */
extern volatile IC IC4 __attribute__((__sfr__));
extern volatile unsigned int IC4BUF __attribute__((__sfr__));
extern volatile unsigned int IC4CON __attribute__((__sfr__));
__extension__ typedef struct tagIC4CONBITS {
union {
struct {
unsigned ICM:3;
unsigned ICBNE:1;
unsigned ICOV:1;
unsigned ICI:2;
unsigned ICTMR:1;
unsigned :5;
unsigned ICSIDL:1;
};
struct {