Imported Upstream version 2.9.0
[debian/cc1111] / device / include / pic / pic16c62.h
1 //
2 // Register Declarations for Microchip 16C62 Processor
3 //
4 //
5 // This header file was automatically generated by:
6 //
7 //      inc2h.pl V4783
8 //
9 //      Copyright (c) 2002, Kevin L. Pauba, All Rights Reserved
10 //
11 //      SDCC is licensed under the GNU Public license (GPL) v2.  Note that
12 //      this license covers the code to the compiler and other executables,
13 //      but explicitly does not cover any code or objects generated by sdcc.
14 //      We have not yet decided on a license for the run time libraries, but
15 //      it will not put any requirements on code linked against it. See:
16 // 
17 //      http://www.gnu.org/copyleft/gpl/html
18 //
19 //      See http://sdcc.sourceforge.net/ for the latest information on sdcc.
20 //
21 // 
22 #ifndef P16C62_H
23 #define P16C62_H
24
25 //
26 // Register addresses.
27 //
28 #define INDF_ADDR       0x0000
29 #define TMR0_ADDR       0x0001
30 #define PCL_ADDR        0x0002
31 #define STATUS_ADDR     0x0003
32 #define FSR_ADDR        0x0004
33 #define PORTA_ADDR      0x0005
34 #define PORTB_ADDR      0x0006
35 #define PORTC_ADDR      0x0007
36 #define PCLATH_ADDR     0x000A
37 #define INTCON_ADDR     0x000B
38 #define PIR1_ADDR       0x000C
39 #define TMR1L_ADDR      0x000E
40 #define TMR1H_ADDR      0x000F
41 #define T1CON_ADDR      0x0010
42 #define TMR2_ADDR       0x0011
43 #define T2CON_ADDR      0x0012
44 #define SSPBUF_ADDR     0x0013
45 #define SSPCON_ADDR     0x0014
46 #define CCPR1L_ADDR     0x0015
47 #define CCPR1H_ADDR     0x0016
48 #define CCP1CON_ADDR    0x0017
49 #define OPTION_REG_ADDR 0x0081
50 #define TRISA_ADDR      0x0085
51 #define TRISB_ADDR      0x0086
52 #define TRISC_ADDR      0x0087
53 #define PIE1_ADDR       0x008C
54 #define PCON_ADDR       0x008E
55 #define PR2_ADDR        0x0092
56 #define SSPADD_ADDR     0x0093
57 #define SSPSTAT_ADDR    0x0094
58
59 //
60 // Memory organization.
61 //
62
63
64
65 //         LIST
66 // P16C62.INC  Standard Header File, Version 1.00    Microchip Technology, Inc.
67 //         NOLIST
68
69 // This header file defines configurations, registers, and other useful bits of
70 // information for the PIC16C62 microcontroller.  These names are taken to match 
71 // the data sheets as closely as possible.  
72
73 // Note that the processor must be selected before this file is 
74 // included.  The processor may be selected the following ways:
75
76 //       1. Command line switch:
77 //               C:\ MPASM MYFILE.ASM /PIC16C62
78 //       2. LIST directive in the source file
79 //               LIST   P=PIC16C62
80 //       3. Processor Type entry in the MPASM full-screen interface
81
82 //==========================================================================
83 //
84 //       Revision History
85 //
86 //==========================================================================
87
88 //Rev:   Date:    Reason:
89
90 //1.00   10/31/95 Initial Release
91
92 //==========================================================================
93 //
94 //       Verify Processor
95 //
96 //==========================================================================
97
98 //        IFNDEF __16C62
99 //            MESSG "Processor-header file mismatch.  Verify selected processor."
100 //         ENDIF
101
102 //==========================================================================
103 //
104 //       Register Definitions
105 //
106 //==========================================================================
107
108 #define W                    0x0000
109 #define F                    0x0001
110
111 //----- Register Files------------------------------------------------------
112
113 extern __sfr  __at (INDF_ADDR)                    INDF;
114 extern __sfr  __at (TMR0_ADDR)                    TMR0;
115 extern __sfr  __at (PCL_ADDR)                     PCL;
116 extern __sfr  __at (STATUS_ADDR)                  STATUS;
117 extern __sfr  __at (FSR_ADDR)                     FSR;
118 extern __sfr  __at (PORTA_ADDR)                   PORTA;
119 extern __sfr  __at (PORTB_ADDR)                   PORTB;
120 extern __sfr  __at (PORTC_ADDR)                   PORTC;
121 extern __sfr  __at (PCLATH_ADDR)                  PCLATH;
122 extern __sfr  __at (INTCON_ADDR)                  INTCON;
123 extern __sfr  __at (PIR1_ADDR)                    PIR1;
124 extern __sfr  __at (TMR1L_ADDR)                   TMR1L;
125 extern __sfr  __at (TMR1H_ADDR)                   TMR1H;
126 extern __sfr  __at (T1CON_ADDR)                   T1CON;
127 extern __sfr  __at (TMR2_ADDR)                    TMR2;
128 extern __sfr  __at (T2CON_ADDR)                   T2CON;
129 extern __sfr  __at (SSPBUF_ADDR)                  SSPBUF;
130 extern __sfr  __at (SSPCON_ADDR)                  SSPCON;
131 extern __sfr  __at (CCPR1L_ADDR)                  CCPR1L;
132 extern __sfr  __at (CCPR1H_ADDR)                  CCPR1H;
133 extern __sfr  __at (CCP1CON_ADDR)                 CCP1CON;
134
135 extern __sfr  __at (OPTION_REG_ADDR)              OPTION_REG;
136 extern __sfr  __at (TRISA_ADDR)                   TRISA;
137 extern __sfr  __at (TRISB_ADDR)                   TRISB;
138 extern __sfr  __at (TRISC_ADDR)                   TRISC;
139 extern __sfr  __at (PIE1_ADDR)                    PIE1;
140 extern __sfr  __at (PCON_ADDR)                    PCON;
141 extern __sfr  __at (PR2_ADDR)                     PR2;
142 extern __sfr  __at (SSPADD_ADDR)                  SSPADD;
143 extern __sfr  __at (SSPSTAT_ADDR)                 SSPSTAT;
144
145 //----- STATUS Bits --------------------------------------------------------
146
147
148 //----- INTCON Bits --------------------------------------------------------
149
150
151 //----- PIR1 Bits ----------------------------------------------------------
152
153
154 //----- T1CON Bits ---------------------------------------------------------
155
156
157 //----- T2CON Bits ---------------------------------------------------------
158
159
160 //----- SSPCON Bits --------------------------------------------------------
161
162
163 //----- CCP1CON Bits -------------------------------------------------------
164
165
166 //----- OPTION Bits --------------------------------------------------------
167
168
169 //----- PIE1 Bits ----------------------------------------------------------
170
171
172 //----- PCON Bits ----------------------------------------------------------
173
174
175 //----- SSPSTAT Bits -------------------------------------------------------
176
177
178 //==========================================================================
179 //
180 //       RAM Definition
181 //
182 //==========================================================================
183
184 //         __MAXRAM H'BF'
185 //         __BADRAM H'08'-H'09', H'0D', H'18'-H'1F'
186 //         __BADRAM H'88'-H'89', H'8D', H'8F'-H'91',H'95'-H'9F'
187
188 //==========================================================================
189 //
190 //       Configuration Bits
191 //
192 //==========================================================================
193
194 #define _CP_ALL              0x3F8F
195 #define _CP_75               0x3F9F
196 #define _CP_50               0x3FAF
197 #define _CP_OFF              0x3FBF
198 #define _PWRTE_ON            0x3FBF
199 #define _PWRTE_OFF           0x3FB7
200 #define _WDT_ON              0x3FBF
201 #define _WDT_OFF             0x3FBB
202 #define _LP_OSC              0x3FBC
203 #define _XT_OSC              0x3FBD
204 #define _HS_OSC              0x3FBE
205 #define _RC_OSC              0x3FBF
206
207 //         LIST
208
209 // ----- CCP1CON bits --------------------
210 typedef union {
211   struct {
212     unsigned char CCP1M0:1;
213     unsigned char CCP1M1:1;
214     unsigned char CCP1M2:1;
215     unsigned char CCP1M3:1;
216     unsigned char CCP1Y:1;
217     unsigned char CCP1X:1;
218     unsigned char :1;
219     unsigned char :1;
220   };
221 } __CCP1CON_bits_t;
222 extern volatile __CCP1CON_bits_t __at(CCP1CON_ADDR) CCP1CON_bits;
223
224 #ifndef NO_BIT_DEFINES
225 #define CCP1M0               CCP1CON_bits.CCP1M0
226 #define CCP1M1               CCP1CON_bits.CCP1M1
227 #define CCP1M2               CCP1CON_bits.CCP1M2
228 #define CCP1M3               CCP1CON_bits.CCP1M3
229 #define CCP1Y                CCP1CON_bits.CCP1Y
230 #define CCP1X                CCP1CON_bits.CCP1X
231 #endif /* NO_BIT_DEFINES */
232
233 // ----- INTCON bits --------------------
234 typedef union {
235   struct {
236     unsigned char RBIF:1;
237     unsigned char INTF:1;
238     unsigned char T0IF:1;
239     unsigned char RBIE:1;
240     unsigned char INTE:1;
241     unsigned char T0IE:1;
242     unsigned char PEIE:1;
243     unsigned char GIE:1;
244   };
245 } __INTCON_bits_t;
246 extern volatile __INTCON_bits_t __at(INTCON_ADDR) INTCON_bits;
247
248 #ifndef NO_BIT_DEFINES
249 #define RBIF                 INTCON_bits.RBIF
250 #define INTF                 INTCON_bits.INTF
251 #define T0IF                 INTCON_bits.T0IF
252 #define RBIE                 INTCON_bits.RBIE
253 #define INTE                 INTCON_bits.INTE
254 #define T0IE                 INTCON_bits.T0IE
255 #define PEIE                 INTCON_bits.PEIE
256 #define GIE                  INTCON_bits.GIE
257 #endif /* NO_BIT_DEFINES */
258
259 // ----- OPTION_REG bits --------------------
260 typedef union {
261   struct {
262     unsigned char PS0:1;
263     unsigned char PS1:1;
264     unsigned char PS2:1;
265     unsigned char PSA:1;
266     unsigned char T0SE:1;
267     unsigned char T0CS:1;
268     unsigned char INTEDG:1;
269     unsigned char NOT_RBPU:1;
270   };
271 } __OPTION_REG_bits_t;
272 extern volatile __OPTION_REG_bits_t __at(OPTION_REG_ADDR) OPTION_REG_bits;
273
274 #ifndef NO_BIT_DEFINES
275 #define PS0                  OPTION_REG_bits.PS0
276 #define PS1                  OPTION_REG_bits.PS1
277 #define PS2                  OPTION_REG_bits.PS2
278 #define PSA                  OPTION_REG_bits.PSA
279 #define T0SE                 OPTION_REG_bits.T0SE
280 #define T0CS                 OPTION_REG_bits.T0CS
281 #define INTEDG               OPTION_REG_bits.INTEDG
282 #define NOT_RBPU             OPTION_REG_bits.NOT_RBPU
283 #endif /* NO_BIT_DEFINES */
284
285 // ----- PCON bits --------------------
286 typedef union {
287   struct {
288     unsigned char :1;
289     unsigned char NOT_POR:1;
290     unsigned char :1;
291     unsigned char :1;
292     unsigned char :1;
293     unsigned char :1;
294     unsigned char :1;
295     unsigned char :1;
296   };
297 } __PCON_bits_t;
298 extern volatile __PCON_bits_t __at(PCON_ADDR) PCON_bits;
299
300 #ifndef NO_BIT_DEFINES
301 #define NOT_POR              PCON_bits.NOT_POR
302 #endif /* NO_BIT_DEFINES */
303
304 // ----- PIE1 bits --------------------
305 typedef union {
306   struct {
307     unsigned char TMR1IE:1;
308     unsigned char TMR2IE:1;
309     unsigned char CCP1IE:1;
310     unsigned char SSPIE:1;
311     unsigned char :1;
312     unsigned char :1;
313     unsigned char :1;
314     unsigned char :1;
315   };
316 } __PIE1_bits_t;
317 extern volatile __PIE1_bits_t __at(PIE1_ADDR) PIE1_bits;
318
319 #ifndef NO_BIT_DEFINES
320 #define TMR1IE               PIE1_bits.TMR1IE
321 #define TMR2IE               PIE1_bits.TMR2IE
322 #define CCP1IE               PIE1_bits.CCP1IE
323 #define SSPIE                PIE1_bits.SSPIE
324 #endif /* NO_BIT_DEFINES */
325
326 // ----- PIR1 bits --------------------
327 typedef union {
328   struct {
329     unsigned char TMR1IF:1;
330     unsigned char TMR2IF:1;
331     unsigned char CCP1IF:1;
332     unsigned char SSPIF:1;
333     unsigned char :1;
334     unsigned char :1;
335     unsigned char :1;
336     unsigned char :1;
337   };
338 } __PIR1_bits_t;
339 extern volatile __PIR1_bits_t __at(PIR1_ADDR) PIR1_bits;
340
341 #ifndef NO_BIT_DEFINES
342 #define TMR1IF               PIR1_bits.TMR1IF
343 #define TMR2IF               PIR1_bits.TMR2IF
344 #define CCP1IF               PIR1_bits.CCP1IF
345 #define SSPIF                PIR1_bits.SSPIF
346 #endif /* NO_BIT_DEFINES */
347
348 // ----- PORTA bits --------------------
349 typedef union {
350   struct {
351     unsigned char RA0:1;
352     unsigned char RA1:1;
353     unsigned char RA2:1;
354     unsigned char RA3:1;
355     unsigned char RA4:1;
356     unsigned char RA5:1;
357     unsigned char :1;
358     unsigned char :1;
359   };
360 } __PORTA_bits_t;
361 extern volatile __PORTA_bits_t __at(PORTA_ADDR) PORTA_bits;
362
363 #ifndef NO_BIT_DEFINES
364 #define RA0                  PORTA_bits.RA0
365 #define RA1                  PORTA_bits.RA1
366 #define RA2                  PORTA_bits.RA2
367 #define RA3                  PORTA_bits.RA3
368 #define RA4                  PORTA_bits.RA4
369 #define RA5                  PORTA_bits.RA5
370 #endif /* NO_BIT_DEFINES */
371
372 // ----- PORTB bits --------------------
373 typedef union {
374   struct {
375     unsigned char RB0:1;
376     unsigned char RB1:1;
377     unsigned char RB2:1;
378     unsigned char RB3:1;
379     unsigned char RB4:1;
380     unsigned char RB5:1;
381     unsigned char RB6:1;
382     unsigned char RB7:1;
383   };
384 } __PORTB_bits_t;
385 extern volatile __PORTB_bits_t __at(PORTB_ADDR) PORTB_bits;
386
387 #ifndef NO_BIT_DEFINES
388 #define RB0                  PORTB_bits.RB0
389 #define RB1                  PORTB_bits.RB1
390 #define RB2                  PORTB_bits.RB2
391 #define RB3                  PORTB_bits.RB3
392 #define RB4                  PORTB_bits.RB4
393 #define RB5                  PORTB_bits.RB5
394 #define RB6                  PORTB_bits.RB6
395 #define RB7                  PORTB_bits.RB7
396 #endif /* NO_BIT_DEFINES */
397
398 // ----- PORTC bits --------------------
399 typedef union {
400   struct {
401     unsigned char RC0:1;
402     unsigned char RC1:1;
403     unsigned char RC2:1;
404     unsigned char RC3:1;
405     unsigned char RC4:1;
406     unsigned char RC5:1;
407     unsigned char RC6:1;
408     unsigned char RC7:1;
409   };
410 } __PORTC_bits_t;
411 extern volatile __PORTC_bits_t __at(PORTC_ADDR) PORTC_bits;
412
413 #ifndef NO_BIT_DEFINES
414 #define RC0                  PORTC_bits.RC0
415 #define RC1                  PORTC_bits.RC1
416 #define RC2                  PORTC_bits.RC2
417 #define RC3                  PORTC_bits.RC3
418 #define RC4                  PORTC_bits.RC4
419 #define RC5                  PORTC_bits.RC5
420 #define RC6                  PORTC_bits.RC6
421 #define RC7                  PORTC_bits.RC7
422 #endif /* NO_BIT_DEFINES */
423
424 // ----- SSPCON bits --------------------
425 typedef union {
426   struct {
427     unsigned char SSPM0:1;
428     unsigned char SSPM1:1;
429     unsigned char SSPM2:1;
430     unsigned char SSPM3:1;
431     unsigned char CKP:1;
432     unsigned char SSPEN:1;
433     unsigned char SSPOV:1;
434     unsigned char WCOL:1;
435   };
436 } __SSPCON_bits_t;
437 extern volatile __SSPCON_bits_t __at(SSPCON_ADDR) SSPCON_bits;
438
439 #ifndef NO_BIT_DEFINES
440 #define SSPM0                SSPCON_bits.SSPM0
441 #define SSPM1                SSPCON_bits.SSPM1
442 #define SSPM2                SSPCON_bits.SSPM2
443 #define SSPM3                SSPCON_bits.SSPM3
444 #define CKP                  SSPCON_bits.CKP
445 #define SSPEN                SSPCON_bits.SSPEN
446 #define SSPOV                SSPCON_bits.SSPOV
447 #define WCOL                 SSPCON_bits.WCOL
448 #endif /* NO_BIT_DEFINES */
449
450 // ----- SSPSTAT bits --------------------
451 typedef union {
452   struct {
453     unsigned char BF:1;
454     unsigned char UA:1;
455     unsigned char R:1;
456     unsigned char S:1;
457     unsigned char P:1;
458     unsigned char D:1;
459     unsigned char :1;
460     unsigned char :1;
461   };
462   struct {
463     unsigned char :1;
464     unsigned char :1;
465     unsigned char I2C_READ:1;
466     unsigned char I2C_START:1;
467     unsigned char I2C_STOP:1;
468     unsigned char I2C_DATA:1;
469     unsigned char :1;
470     unsigned char :1;
471   };
472   struct {
473     unsigned char :1;
474     unsigned char :1;
475     unsigned char NOT_W:1;
476     unsigned char :1;
477     unsigned char :1;
478     unsigned char NOT_A:1;
479     unsigned char :1;
480     unsigned char :1;
481   };
482   struct {
483     unsigned char :1;
484     unsigned char :1;
485     unsigned char NOT_WRITE:1;
486     unsigned char :1;
487     unsigned char :1;
488     unsigned char NOT_ADDRESS:1;
489     unsigned char :1;
490     unsigned char :1;
491   };
492   struct {
493     unsigned char :1;
494     unsigned char :1;
495     unsigned char R_W:1;
496     unsigned char :1;
497     unsigned char :1;
498     unsigned char D_A:1;
499     unsigned char :1;
500     unsigned char :1;
501   };
502   struct {
503     unsigned char :1;
504     unsigned char :1;
505     unsigned char READ_WRITE:1;
506     unsigned char :1;
507     unsigned char :1;
508     unsigned char DATA_ADDRESS:1;
509     unsigned char :1;
510     unsigned char :1;
511   };
512 } __SSPSTAT_bits_t;
513 extern volatile __SSPSTAT_bits_t __at(SSPSTAT_ADDR) SSPSTAT_bits;
514
515 #ifndef NO_BIT_DEFINES
516 #define BF                   SSPSTAT_bits.BF
517 #define UA                   SSPSTAT_bits.UA
518 #define R                    SSPSTAT_bits.R
519 #define I2C_READ             SSPSTAT_bits.I2C_READ
520 #define NOT_W                SSPSTAT_bits.NOT_W
521 #define NOT_WRITE            SSPSTAT_bits.NOT_WRITE
522 #define R_W                  SSPSTAT_bits.R_W
523 #define READ_WRITE           SSPSTAT_bits.READ_WRITE
524 #define S                    SSPSTAT_bits.S
525 #define I2C_START            SSPSTAT_bits.I2C_START
526 #define P                    SSPSTAT_bits.P
527 #define I2C_STOP             SSPSTAT_bits.I2C_STOP
528 #define D                    SSPSTAT_bits.D
529 #define I2C_DATA             SSPSTAT_bits.I2C_DATA
530 #define NOT_A                SSPSTAT_bits.NOT_A
531 #define NOT_ADDRESS          SSPSTAT_bits.NOT_ADDRESS
532 #define D_A                  SSPSTAT_bits.D_A
533 #define DATA_ADDRESS         SSPSTAT_bits.DATA_ADDRESS
534 #endif /* NO_BIT_DEFINES */
535
536 // ----- STATUS bits --------------------
537 typedef union {
538   struct {
539     unsigned char C:1;
540     unsigned char DC:1;
541     unsigned char Z:1;
542     unsigned char NOT_PD:1;
543     unsigned char NOT_TO:1;
544     unsigned char RP0:1;
545     unsigned char RP1:1;
546     unsigned char IRP:1;
547   };
548 } __STATUS_bits_t;
549 extern volatile __STATUS_bits_t __at(STATUS_ADDR) STATUS_bits;
550
551 #ifndef NO_BIT_DEFINES
552 #define C                    STATUS_bits.C
553 #define DC                   STATUS_bits.DC
554 #define Z                    STATUS_bits.Z
555 #define NOT_PD               STATUS_bits.NOT_PD
556 #define NOT_TO               STATUS_bits.NOT_TO
557 #define RP0                  STATUS_bits.RP0
558 #define RP1                  STATUS_bits.RP1
559 #define IRP                  STATUS_bits.IRP
560 #endif /* NO_BIT_DEFINES */
561
562 // ----- T1CON bits --------------------
563 typedef union {
564   struct {
565     unsigned char TMR1ON:1;
566     unsigned char TMR1CS:1;
567     unsigned char NOT_T1SYNC:1;
568     unsigned char T1OSCEN:1;
569     unsigned char T1CKPS0:1;
570     unsigned char T1CKPS1:1;
571     unsigned char :1;
572     unsigned char :1;
573   };
574   struct {
575     unsigned char :1;
576     unsigned char :1;
577     unsigned char T1INSYNC:1;
578     unsigned char :1;
579     unsigned char :1;
580     unsigned char :1;
581     unsigned char :1;
582     unsigned char :1;
583   };
584 } __T1CON_bits_t;
585 extern volatile __T1CON_bits_t __at(T1CON_ADDR) T1CON_bits;
586
587 #ifndef NO_BIT_DEFINES
588 #define TMR1ON               T1CON_bits.TMR1ON
589 #define TMR1CS               T1CON_bits.TMR1CS
590 #define NOT_T1SYNC           T1CON_bits.NOT_T1SYNC
591 #define T1INSYNC             T1CON_bits.T1INSYNC
592 #define T1OSCEN              T1CON_bits.T1OSCEN
593 #define T1CKPS0              T1CON_bits.T1CKPS0
594 #define T1CKPS1              T1CON_bits.T1CKPS1
595 #endif /* NO_BIT_DEFINES */
596
597 // ----- T2CON bits --------------------
598 typedef union {
599   struct {
600     unsigned char T2CKPS0:1;
601     unsigned char T2CKPS1:1;
602     unsigned char TMR2ON:1;
603     unsigned char TOUTPS0:1;
604     unsigned char TOUTPS1:1;
605     unsigned char TOUTPS2:1;
606     unsigned char TOUTPS3:1;
607     unsigned char :1;
608   };
609 } __T2CON_bits_t;
610 extern volatile __T2CON_bits_t __at(T2CON_ADDR) T2CON_bits;
611
612 #ifndef NO_BIT_DEFINES
613 #define T2CKPS0              T2CON_bits.T2CKPS0
614 #define T2CKPS1              T2CON_bits.T2CKPS1
615 #define TMR2ON               T2CON_bits.TMR2ON
616 #define TOUTPS0              T2CON_bits.TOUTPS0
617 #define TOUTPS1              T2CON_bits.TOUTPS1
618 #define TOUTPS2              T2CON_bits.TOUTPS2
619 #define TOUTPS3              T2CON_bits.TOUTPS3
620 #endif /* NO_BIT_DEFINES */
621
622 // ----- TRISA bits --------------------
623 typedef union {
624   struct {
625     unsigned char TRISA0:1;
626     unsigned char TRISA1:1;
627     unsigned char TRISA2:1;
628     unsigned char TRISA3:1;
629     unsigned char TRISA4:1;
630     unsigned char TRISA5:1;
631     unsigned char :1;
632     unsigned char :1;
633   };
634 } __TRISA_bits_t;
635 extern volatile __TRISA_bits_t __at(TRISA_ADDR) TRISA_bits;
636
637 #ifndef NO_BIT_DEFINES
638 #define TRISA0               TRISA_bits.TRISA0
639 #define TRISA1               TRISA_bits.TRISA1
640 #define TRISA2               TRISA_bits.TRISA2
641 #define TRISA3               TRISA_bits.TRISA3
642 #define TRISA4               TRISA_bits.TRISA4
643 #define TRISA5               TRISA_bits.TRISA5
644 #endif /* NO_BIT_DEFINES */
645
646 // ----- TRISB bits --------------------
647 typedef union {
648   struct {
649     unsigned char TRISB0:1;
650     unsigned char TRISB1:1;
651     unsigned char TRISB2:1;
652     unsigned char TRISB3:1;
653     unsigned char TRISB4:1;
654     unsigned char TRISB5:1;
655     unsigned char TRISB6:1;
656     unsigned char TRISB7:1;
657   };
658 } __TRISB_bits_t;
659 extern volatile __TRISB_bits_t __at(TRISB_ADDR) TRISB_bits;
660
661 #ifndef NO_BIT_DEFINES
662 #define TRISB0               TRISB_bits.TRISB0
663 #define TRISB1               TRISB_bits.TRISB1
664 #define TRISB2               TRISB_bits.TRISB2
665 #define TRISB3               TRISB_bits.TRISB3
666 #define TRISB4               TRISB_bits.TRISB4
667 #define TRISB5               TRISB_bits.TRISB5
668 #define TRISB6               TRISB_bits.TRISB6
669 #define TRISB7               TRISB_bits.TRISB7
670 #endif /* NO_BIT_DEFINES */
671
672 // ----- TRISC bits --------------------
673 typedef union {
674   struct {
675     unsigned char TRISC0:1;
676     unsigned char TRISC1:1;
677     unsigned char TRISC2:1;
678     unsigned char TRISC3:1;
679     unsigned char TRISC4:1;
680     unsigned char TRISC5:1;
681     unsigned char TRISC6:1;
682     unsigned char TRISC7:1;
683   };
684 } __TRISC_bits_t;
685 extern volatile __TRISC_bits_t __at(TRISC_ADDR) TRISC_bits;
686
687 #ifndef NO_BIT_DEFINES
688 #define TRISC0               TRISC_bits.TRISC0
689 #define TRISC1               TRISC_bits.TRISC1
690 #define TRISC2               TRISC_bits.TRISC2
691 #define TRISC3               TRISC_bits.TRISC3
692 #define TRISC4               TRISC_bits.TRISC4
693 #define TRISC5               TRISC_bits.TRISC5
694 #define TRISC6               TRISC_bits.TRISC6
695 #define TRISC7               TRISC_bits.TRISC7
696 #endif /* NO_BIT_DEFINES */
697
698 #endif