* support/scripts/inc2h.pl: conditionally emit defines for SFR bits,
[fw/sdcc] / device / include / pic / pic16f648a.h
1 //
2 // Register Declarations for Microchip 16F648A 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 P16F648A_H
23 #define P16F648A_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 PCLATH_ADDR     0x000A
36 #define INTCON_ADDR     0x000B
37 #define PIR1_ADDR       0x000C
38 #define TMR1L_ADDR      0x000E
39 #define TMR1H_ADDR      0x000F
40 #define T1CON_ADDR      0x0010
41 #define TMR2_ADDR       0x0011
42 #define T2CON_ADDR      0x0012
43 #define CCPR1L_ADDR     0x0015
44 #define CCPR1H_ADDR     0x0016
45 #define CCP1CON_ADDR    0x0017
46 #define RCSTA_ADDR      0x0018
47 #define TXREG_ADDR      0x0019
48 #define RCREG_ADDR      0x001A
49 #define CMCON_ADDR      0x001F
50 #define OPTION_REG_ADDR 0x0081
51 #define TRISA_ADDR      0x0085
52 #define TRISB_ADDR      0x0086
53 #define PIE1_ADDR       0x008C
54 #define PCON_ADDR       0x008E
55 #define PR2_ADDR        0x0092
56 #define TXSTA_ADDR      0x0098
57 #define SPBRG_ADDR      0x0099
58 #define EEDATA_ADDR     0x009A
59 #define EEADR_ADDR      0x009B
60 #define EECON1_ADDR     0x009C
61 #define EECON2_ADDR     0x009D
62 #define VRCON_ADDR      0x009F
63
64 //
65 // Memory organization.
66 //
67
68
69
70 //         LIST
71 // P16F648A.INC  Standard Header File, Version 1.00    Microchip Technology, Inc.
72 //         NOLIST
73
74 // This header file defines configurations, registers, and other useful bits of
75 // information for the PIC16F648A microcontroller.  These names are taken to match
76 // the data sheets as closely as possible.
77
78 // Note that the processor must be selected before this file is
79 // included.  The processor may be selected the following ways:
80
81 //       1. Command line switch:
82 //               C:\ MPASM MYFILE.ASM /PIC16F648A
83 //       2. LIST directive in the source file
84 //               LIST   P=PIC16F648A
85 //       3. Processor Type entry in the MPASM full-screen interface
86
87 //==========================================================================
88 //
89 //       Revision History
90 //
91 //==========================================================================
92
93 //Rev:   Date:    Reason:
94 //1.00   14 Nov 2002 Initial Release
95
96 //==========================================================================
97 //
98 //       Verify Processor
99 //
100 //==========================================================================
101
102 //        IFNDEF __16F648A
103 //            MESSG "Processor-header file mismatch.  Verify selected processor."
104 //         ENDIF
105
106 //==========================================================================
107 //
108 //       Register Definitions
109 //
110 //==========================================================================
111
112 #define W                    0x0000
113 #define F                    0x0001
114
115 //----- Register Files------------------------------------------------------
116
117 extern __sfr  __at (INDF_ADDR)                    INDF;
118 extern __sfr  __at (TMR0_ADDR)                    TMR0;
119 extern __sfr  __at (PCL_ADDR)                     PCL;
120 extern __sfr  __at (STATUS_ADDR)                  STATUS;
121 extern __sfr  __at (FSR_ADDR)                     FSR;
122 extern __sfr  __at (PORTA_ADDR)                   PORTA;
123 extern __sfr  __at (PORTB_ADDR)                   PORTB;
124 extern __sfr  __at (PCLATH_ADDR)                  PCLATH;
125 extern __sfr  __at (INTCON_ADDR)                  INTCON;
126 extern __sfr  __at (PIR1_ADDR)                    PIR1;
127 extern __sfr  __at (TMR1L_ADDR)                   TMR1L;
128 extern __sfr  __at (TMR1H_ADDR)                   TMR1H;
129 extern __sfr  __at (T1CON_ADDR)                   T1CON;
130 extern __sfr  __at (TMR2_ADDR)                    TMR2;
131 extern __sfr  __at (T2CON_ADDR)                   T2CON;
132 extern __sfr  __at (CCPR1L_ADDR)                  CCPR1L;
133 extern __sfr  __at (CCPR1H_ADDR)                  CCPR1H;
134 extern __sfr  __at (CCP1CON_ADDR)                 CCP1CON;
135 extern __sfr  __at (RCSTA_ADDR)                   RCSTA;
136 extern __sfr  __at (TXREG_ADDR)                   TXREG;
137 extern __sfr  __at (RCREG_ADDR)                   RCREG;
138 extern __sfr  __at (CMCON_ADDR)                   CMCON;
139
140 extern __sfr  __at (OPTION_REG_ADDR)              OPTION_REG;
141 extern __sfr  __at (TRISA_ADDR)                   TRISA;
142 extern __sfr  __at (TRISB_ADDR)                   TRISB;
143 extern __sfr  __at (PIE1_ADDR)                    PIE1;
144 extern __sfr  __at (PCON_ADDR)                    PCON;
145 extern __sfr  __at (PR2_ADDR)                     PR2;
146 extern __sfr  __at (TXSTA_ADDR)                   TXSTA;
147 extern __sfr  __at (SPBRG_ADDR)                   SPBRG;
148 extern __sfr  __at (EEDATA_ADDR)                  EEDATA;
149 extern __sfr  __at (EEADR_ADDR)                   EEADR;
150 extern __sfr  __at (EECON1_ADDR)                  EECON1;
151 extern __sfr  __at (EECON2_ADDR)                  EECON2;
152 extern __sfr  __at (VRCON_ADDR)                   VRCON;
153
154 //----- STATUS Bits --------------------------------------------------------
155
156
157 //----- INTCON Bits --------------------------------------------------------
158
159
160 //----- PIR1 Bits ----------------------------------------------------------
161
162
163 //----- T1CON Bits ---------------------------------------------------------
164
165 //----- T2CON Bits ---------------------------------------------------------
166
167 //----- CCP1CON Bits ---------------------------------------------------------
168
169 //----- RCSTA Bits ---------------------------------------------------------
170
171 //----- CMCON Bits ---------------------------------------------------------
172
173
174 //----- OPTION Bits --------------------------------------------------------
175
176
177 //----- PIE1 Bits ----------------------------------------------------------
178
179
180 //----- PCON Bits ----------------------------------------------------------
181
182
183 //----- TXSTA Bits ----------------------------------------------------------
184
185 //----- EECON1 Bits ---------------------------------------------------------
186
187 //----- VRCON Bits ---------------------------------------------------------
188
189
190 //==========================================================================
191 //
192 //       RAM Definition
193 //
194 //==========================================================================
195
196 //     __MAXRAM H'01FF'
197 //     __BADRAM H'07'-H'09', H'0D', H'13'-H'14', H'1B'-H'1E'
198 //     __BADRAM H'87'-H'89', H'8D', H'8F'-H'91', H'93'-H'97', H'9E'
199 //     __BADRAM H'105', H'107'-H'109', H'10C'-H'11F'
200 //     __BADRAM H'185', H'187'-H'189', H'18C'-H'1EF'
201
202 //==========================================================================
203 //
204 //       Configuration Bits
205 //
206 //==========================================================================
207
208 #define _BODEN_ON            0x3FFF //Backwards compatability to 16F62X
209 #define _BODEN_OFF           0x3FBF //Backwards compatability to 16F62X
210 #define _BOREN_ON            0x3FFF
211 #define _BOREN_OFF           0x3FBF
212 #define _CP_ON               0x1FFF
213 #define _CP_OFF              0x3FFF
214 #define _DATA_CP_ON          0x3EFF
215 #define _DATA_CP_OFF         0x3FFF
216 #define _PWRTE_OFF           0x3FFF
217 #define _PWRTE_ON            0x3FF7
218 #define _WDT_ON              0x3FFF
219 #define _WDT_OFF             0x3FFB
220 #define _LVP_ON              0x3FFF
221 #define _LVP_OFF             0x3F7F
222 #define _MCLRE_ON            0x3FFF
223 #define _MCLRE_OFF           0x3FDF
224 #define _RC_OSC_CLKOUT       0x3FFF
225 #define _RC_OSC_NOCLKOUT     0x3FFE
226 #define _ER_OSC_CLKOUT       0x3FFF //Backwards compatability to 16F62X
227 #define _ER_OSC_NOCLKOUT     0x3FFE //Backwards compatability to 16F62X
228 #define _INTOSC_OSC_CLKOUT   0x3FFD
229 #define _INTOSC_OSC_NOCLKOUT 0x3FFC    
230 #define _INTRC_OSC_CLKOUT    0x3FFD //Backwards compatability to 16F62X
231 #define _INTRC_OSC_NOCLKOUT  0x3FFC //Backwards compatability to 16F62X
232 #define _EXTCLK_OSC          0x3FEF
233 #define _HS_OSC              0x3FEE
234 #define _XT_OSC              0x3FED
235 #define _LP_OSC              0x3FEC
236
237 //         LIST
238
239 // ----- CCP1CON bits --------------------
240 typedef union {
241   struct {
242     unsigned char CCP1M0:1;
243     unsigned char CCP1M1:1;
244     unsigned char CCP1M2:1;
245     unsigned char CCP1M3:1;
246     unsigned char CCP1Y:1;
247     unsigned char CCP1X:1;
248     unsigned char :1;
249     unsigned char :1;
250   };
251 } __CCP1CON_bits_t;
252 extern volatile __CCP1CON_bits_t __at(CCP1CON_ADDR) CCP1CON_bits;
253
254 #ifndef NO_BIT_DEFINES
255 #define CCP1M0               CCP1CON_bits.CCP1M0
256 #define CCP1M1               CCP1CON_bits.CCP1M1
257 #define CCP1M2               CCP1CON_bits.CCP1M2
258 #define CCP1M3               CCP1CON_bits.CCP1M3
259 #define CCP1Y                CCP1CON_bits.CCP1Y
260 #define CCP1X                CCP1CON_bits.CCP1X
261 #endif /* NO_BIT_DEFINES */
262
263 // ----- CMCON bits --------------------
264 typedef union {
265   struct {
266     unsigned char CM0:1;
267     unsigned char CM1:1;
268     unsigned char CM2:1;
269     unsigned char CIS:1;
270     unsigned char C1INV:1;
271     unsigned char C2INV:1;
272     unsigned char C1OUT:1;
273     unsigned char C2OUT:1;
274   };
275 } __CMCON_bits_t;
276 extern volatile __CMCON_bits_t __at(CMCON_ADDR) CMCON_bits;
277
278 #ifndef NO_BIT_DEFINES
279 #define CM0                  CMCON_bits.CM0
280 #define CM1                  CMCON_bits.CM1
281 #define CM2                  CMCON_bits.CM2
282 #define CIS                  CMCON_bits.CIS
283 #define C1INV                CMCON_bits.C1INV
284 #define C2INV                CMCON_bits.C2INV
285 #define C1OUT                CMCON_bits.C1OUT
286 #define C2OUT                CMCON_bits.C2OUT
287 #endif /* NO_BIT_DEFINES */
288
289 // ----- EECON1 bits --------------------
290 typedef union {
291   struct {
292     unsigned char RD:1;
293     unsigned char WR:1;
294     unsigned char WREN:1;
295     unsigned char WRERR:1;
296     unsigned char :1;
297     unsigned char :1;
298     unsigned char :1;
299     unsigned char :1;
300   };
301 } __EECON1_bits_t;
302 extern volatile __EECON1_bits_t __at(EECON1_ADDR) EECON1_bits;
303
304 #ifndef NO_BIT_DEFINES
305 #define RD                   EECON1_bits.RD
306 #define WR                   EECON1_bits.WR
307 #define WREN                 EECON1_bits.WREN
308 #define WRERR                EECON1_bits.WRERR
309 #endif /* NO_BIT_DEFINES */
310
311 // ----- INTCON bits --------------------
312 typedef union {
313   struct {
314     unsigned char RBIF:1;
315     unsigned char INTF:1;
316     unsigned char T0IF:1;
317     unsigned char RBIE:1;
318     unsigned char INTE:1;
319     unsigned char T0IE:1;
320     unsigned char PEIE:1;
321     unsigned char GIE:1;
322   };
323 } __INTCON_bits_t;
324 extern volatile __INTCON_bits_t __at(INTCON_ADDR) INTCON_bits;
325
326 #ifndef NO_BIT_DEFINES
327 #define RBIF                 INTCON_bits.RBIF
328 #define INTF                 INTCON_bits.INTF
329 #define T0IF                 INTCON_bits.T0IF
330 #define RBIE                 INTCON_bits.RBIE
331 #define INTE                 INTCON_bits.INTE
332 #define T0IE                 INTCON_bits.T0IE
333 #define PEIE                 INTCON_bits.PEIE
334 #define GIE                  INTCON_bits.GIE
335 #endif /* NO_BIT_DEFINES */
336
337 // ----- OPTION_REG bits --------------------
338 typedef union {
339   struct {
340     unsigned char PS0:1;
341     unsigned char PS1:1;
342     unsigned char PS2:1;
343     unsigned char PSA:1;
344     unsigned char T0SE:1;
345     unsigned char T0CS:1;
346     unsigned char INTEDG:1;
347     unsigned char NOT_RBPU:1;
348   };
349 } __OPTION_REG_bits_t;
350 extern volatile __OPTION_REG_bits_t __at(OPTION_REG_ADDR) OPTION_REG_bits;
351
352 #ifndef NO_BIT_DEFINES
353 #define PS0                  OPTION_REG_bits.PS0
354 #define PS1                  OPTION_REG_bits.PS1
355 #define PS2                  OPTION_REG_bits.PS2
356 #define PSA                  OPTION_REG_bits.PSA
357 #define T0SE                 OPTION_REG_bits.T0SE
358 #define T0CS                 OPTION_REG_bits.T0CS
359 #define INTEDG               OPTION_REG_bits.INTEDG
360 #define NOT_RBPU             OPTION_REG_bits.NOT_RBPU
361 #endif /* NO_BIT_DEFINES */
362
363 // ----- PCON bits --------------------
364 typedef union {
365   struct {
366     unsigned char NOT_BO:1;
367     unsigned char NOT_POR:1;
368     unsigned char :1;
369     unsigned char OSCF:1;
370     unsigned char :1;
371     unsigned char :1;
372     unsigned char :1;
373     unsigned char :1;
374   };
375   struct {
376     unsigned char NOT_BOR:1;
377     unsigned char :1;
378     unsigned char :1;
379     unsigned char :1;
380     unsigned char :1;
381     unsigned char :1;
382     unsigned char :1;
383     unsigned char :1;
384   };
385   struct {
386     unsigned char NOT_BOD:1;
387     unsigned char :1;
388     unsigned char :1;
389     unsigned char :1;
390     unsigned char :1;
391     unsigned char :1;
392     unsigned char :1;
393     unsigned char :1;
394   };
395 } __PCON_bits_t;
396 extern volatile __PCON_bits_t __at(PCON_ADDR) PCON_bits;
397
398 #ifndef NO_BIT_DEFINES
399 #define NOT_BO               PCON_bits.NOT_BO
400 #define NOT_BOR              PCON_bits.NOT_BOR
401 #define NOT_BOD              PCON_bits.NOT_BOD
402 #define NOT_POR              PCON_bits.NOT_POR
403 #define OSCF                 PCON_bits.OSCF
404 #endif /* NO_BIT_DEFINES */
405
406 // ----- PIE1 bits --------------------
407 typedef union {
408   struct {
409     unsigned char TMR1IE:1;
410     unsigned char TMR2IE:1;
411     unsigned char CCP1IE:1;
412     unsigned char :1;
413     unsigned char TXIE:1;
414     unsigned char RCIE:1;
415     unsigned char CMIE:1;
416     unsigned char EEIE:1;
417   };
418 } __PIE1_bits_t;
419 extern volatile __PIE1_bits_t __at(PIE1_ADDR) PIE1_bits;
420
421 #ifndef NO_BIT_DEFINES
422 #define TMR1IE               PIE1_bits.TMR1IE
423 #define TMR2IE               PIE1_bits.TMR2IE
424 #define CCP1IE               PIE1_bits.CCP1IE
425 #define TXIE                 PIE1_bits.TXIE
426 #define RCIE                 PIE1_bits.RCIE
427 #define CMIE                 PIE1_bits.CMIE
428 #define EEIE                 PIE1_bits.EEIE
429 #endif /* NO_BIT_DEFINES */
430
431 // ----- PIR1 bits --------------------
432 typedef union {
433   struct {
434     unsigned char TMR1IF:1;
435     unsigned char TMR2IF:1;
436     unsigned char CCP1IF:1;
437     unsigned char :1;
438     unsigned char TXIF:1;
439     unsigned char RCIF:1;
440     unsigned char CMIF:1;
441     unsigned char EEIF:1;
442   };
443 } __PIR1_bits_t;
444 extern volatile __PIR1_bits_t __at(PIR1_ADDR) PIR1_bits;
445
446 #ifndef NO_BIT_DEFINES
447 #define TMR1IF               PIR1_bits.TMR1IF
448 #define TMR2IF               PIR1_bits.TMR2IF
449 #define CCP1IF               PIR1_bits.CCP1IF
450 #define TXIF                 PIR1_bits.TXIF
451 #define RCIF                 PIR1_bits.RCIF
452 #define CMIF                 PIR1_bits.CMIF
453 #define EEIF                 PIR1_bits.EEIF
454 #endif /* NO_BIT_DEFINES */
455
456 // ----- PORTA bits --------------------
457 typedef union {
458   struct {
459     unsigned char RA0:1;
460     unsigned char RA1:1;
461     unsigned char RA2:1;
462     unsigned char RA3:1;
463     unsigned char RA4:1;
464     unsigned char RA5:1;
465     unsigned char :1;
466     unsigned char :1;
467   };
468 } __PORTA_bits_t;
469 extern volatile __PORTA_bits_t __at(PORTA_ADDR) PORTA_bits;
470
471 #ifndef NO_BIT_DEFINES
472 #define RA0                  PORTA_bits.RA0
473 #define RA1                  PORTA_bits.RA1
474 #define RA2                  PORTA_bits.RA2
475 #define RA3                  PORTA_bits.RA3
476 #define RA4                  PORTA_bits.RA4
477 #define RA5                  PORTA_bits.RA5
478 #endif /* NO_BIT_DEFINES */
479
480 // ----- PORTB bits --------------------
481 typedef union {
482   struct {
483     unsigned char RB0:1;
484     unsigned char RB1:1;
485     unsigned char RB2:1;
486     unsigned char RB3:1;
487     unsigned char RB4:1;
488     unsigned char RB5:1;
489     unsigned char RB6:1;
490     unsigned char RB7:1;
491   };
492 } __PORTB_bits_t;
493 extern volatile __PORTB_bits_t __at(PORTB_ADDR) PORTB_bits;
494
495 #ifndef NO_BIT_DEFINES
496 #define RB0                  PORTB_bits.RB0
497 #define RB1                  PORTB_bits.RB1
498 #define RB2                  PORTB_bits.RB2
499 #define RB3                  PORTB_bits.RB3
500 #define RB4                  PORTB_bits.RB4
501 #define RB5                  PORTB_bits.RB5
502 #define RB6                  PORTB_bits.RB6
503 #define RB7                  PORTB_bits.RB7
504 #endif /* NO_BIT_DEFINES */
505
506 // ----- RCSTA bits --------------------
507 typedef union {
508   struct {
509     unsigned char RX9D:1;
510     unsigned char OERR:1;
511     unsigned char FERR:1;
512     unsigned char ADEN:1;
513     unsigned char CREN:1;
514     unsigned char SREN:1;
515     unsigned char RX9:1;
516     unsigned char SPEN:1;
517   };
518 } __RCSTA_bits_t;
519 extern volatile __RCSTA_bits_t __at(RCSTA_ADDR) RCSTA_bits;
520
521 #ifndef NO_BIT_DEFINES
522 #define RX9D                 RCSTA_bits.RX9D
523 #define OERR                 RCSTA_bits.OERR
524 #define FERR                 RCSTA_bits.FERR
525 #define ADEN                 RCSTA_bits.ADEN
526 #define CREN                 RCSTA_bits.CREN
527 #define SREN                 RCSTA_bits.SREN
528 #define RX9                  RCSTA_bits.RX9
529 #define SPEN                 RCSTA_bits.SPEN
530 #endif /* NO_BIT_DEFINES */
531
532 // ----- STATUS bits --------------------
533 typedef union {
534   struct {
535     unsigned char C:1;
536     unsigned char DC:1;
537     unsigned char Z:1;
538     unsigned char NOT_PD:1;
539     unsigned char NOT_TO:1;
540     unsigned char RP0:1;
541     unsigned char RP1:1;
542     unsigned char IRP:1;
543   };
544 } __STATUS_bits_t;
545 extern volatile __STATUS_bits_t __at(STATUS_ADDR) STATUS_bits;
546
547 #ifndef NO_BIT_DEFINES
548 #define C                    STATUS_bits.C
549 #define DC                   STATUS_bits.DC
550 #define Z                    STATUS_bits.Z
551 #define NOT_PD               STATUS_bits.NOT_PD
552 #define NOT_TO               STATUS_bits.NOT_TO
553 #define RP0                  STATUS_bits.RP0
554 #define RP1                  STATUS_bits.RP1
555 #define IRP                  STATUS_bits.IRP
556 #endif /* NO_BIT_DEFINES */
557
558 // ----- T1CON bits --------------------
559 typedef union {
560   struct {
561     unsigned char TMR1ON:1;
562     unsigned char TMR1CS:1;
563     unsigned char NOT_T1SYNC:1;
564     unsigned char T1OSCEN:1;
565     unsigned char T1CKPS0:1;
566     unsigned char T1CKPS1:1;
567     unsigned char :1;
568     unsigned char :1;
569   };
570 } __T1CON_bits_t;
571 extern volatile __T1CON_bits_t __at(T1CON_ADDR) T1CON_bits;
572
573 #ifndef NO_BIT_DEFINES
574 #define TMR1ON               T1CON_bits.TMR1ON
575 #define TMR1CS               T1CON_bits.TMR1CS
576 #define NOT_T1SYNC           T1CON_bits.NOT_T1SYNC
577 #define T1OSCEN              T1CON_bits.T1OSCEN
578 #define T1CKPS0              T1CON_bits.T1CKPS0
579 #define T1CKPS1              T1CON_bits.T1CKPS1
580 #endif /* NO_BIT_DEFINES */
581
582 // ----- T2CON bits --------------------
583 typedef union {
584   struct {
585     unsigned char T2CKPS0:1;
586     unsigned char T2CKPS1:1;
587     unsigned char TMR2ON:1;
588     unsigned char TOUTPS0:1;
589     unsigned char TOUTPS1:1;
590     unsigned char TOUTPS2:1;
591     unsigned char TOUTPS3:1;
592     unsigned char :1;
593   };
594 } __T2CON_bits_t;
595 extern volatile __T2CON_bits_t __at(T2CON_ADDR) T2CON_bits;
596
597 #ifndef NO_BIT_DEFINES
598 #define T2CKPS0              T2CON_bits.T2CKPS0
599 #define T2CKPS1              T2CON_bits.T2CKPS1
600 #define TMR2ON               T2CON_bits.TMR2ON
601 #define TOUTPS0              T2CON_bits.TOUTPS0
602 #define TOUTPS1              T2CON_bits.TOUTPS1
603 #define TOUTPS2              T2CON_bits.TOUTPS2
604 #define TOUTPS3              T2CON_bits.TOUTPS3
605 #endif /* NO_BIT_DEFINES */
606
607 // ----- TRISA bits --------------------
608 typedef union {
609   struct {
610     unsigned char TRISA0:1;
611     unsigned char TRISA1:1;
612     unsigned char TRISA2:1;
613     unsigned char TRISA3:1;
614     unsigned char TRISA4:1;
615     unsigned char TRISA5:1;
616     unsigned char :1;
617     unsigned char :1;
618   };
619 } __TRISA_bits_t;
620 extern volatile __TRISA_bits_t __at(TRISA_ADDR) TRISA_bits;
621
622 #ifndef NO_BIT_DEFINES
623 #define TRISA0               TRISA_bits.TRISA0
624 #define TRISA1               TRISA_bits.TRISA1
625 #define TRISA2               TRISA_bits.TRISA2
626 #define TRISA3               TRISA_bits.TRISA3
627 #define TRISA4               TRISA_bits.TRISA4
628 #define TRISA5               TRISA_bits.TRISA5
629 #endif /* NO_BIT_DEFINES */
630
631 // ----- TRISB bits --------------------
632 typedef union {
633   struct {
634     unsigned char TRISB0:1;
635     unsigned char TRISB1:1;
636     unsigned char TRISB2:1;
637     unsigned char TRISB3:1;
638     unsigned char TRISB4:1;
639     unsigned char TRISB5:1;
640     unsigned char TRISB6:1;
641     unsigned char TRISB7:1;
642   };
643 } __TRISB_bits_t;
644 extern volatile __TRISB_bits_t __at(TRISB_ADDR) TRISB_bits;
645
646 #ifndef NO_BIT_DEFINES
647 #define TRISB0               TRISB_bits.TRISB0
648 #define TRISB1               TRISB_bits.TRISB1
649 #define TRISB2               TRISB_bits.TRISB2
650 #define TRISB3               TRISB_bits.TRISB3
651 #define TRISB4               TRISB_bits.TRISB4
652 #define TRISB5               TRISB_bits.TRISB5
653 #define TRISB6               TRISB_bits.TRISB6
654 #define TRISB7               TRISB_bits.TRISB7
655 #endif /* NO_BIT_DEFINES */
656
657 // ----- TXSTA bits --------------------
658 typedef union {
659   struct {
660     unsigned char TX9D:1;
661     unsigned char TRMT:1;
662     unsigned char BRGH:1;
663     unsigned char :1;
664     unsigned char SYNC:1;
665     unsigned char TXEN:1;
666     unsigned char TX9:1;
667     unsigned char CSRC:1;
668   };
669 } __TXSTA_bits_t;
670 extern volatile __TXSTA_bits_t __at(TXSTA_ADDR) TXSTA_bits;
671
672 #ifndef NO_BIT_DEFINES
673 #define TX9D                 TXSTA_bits.TX9D
674 #define TRMT                 TXSTA_bits.TRMT
675 #define BRGH                 TXSTA_bits.BRGH
676 #define SYNC                 TXSTA_bits.SYNC
677 #define TXEN                 TXSTA_bits.TXEN
678 #define TX9                  TXSTA_bits.TX9
679 #define CSRC                 TXSTA_bits.CSRC
680 #endif /* NO_BIT_DEFINES */
681
682 // ----- VRCON bits --------------------
683 typedef union {
684   struct {
685     unsigned char VR0:1;
686     unsigned char VR1:1;
687     unsigned char VR2:1;
688     unsigned char VR3:1;
689     unsigned char :1;
690     unsigned char VRR:1;
691     unsigned char VROE:1;
692     unsigned char VREN:1;
693   };
694 } __VRCON_bits_t;
695 extern volatile __VRCON_bits_t __at(VRCON_ADDR) VRCON_bits;
696
697 #ifndef NO_BIT_DEFINES
698 #define VR0                  VRCON_bits.VR0
699 #define VR1                  VRCON_bits.VR1
700 #define VR2                  VRCON_bits.VR2
701 #define VR3                  VRCON_bits.VR3
702 #define VRR                  VRCON_bits.VRR
703 #define VROE                 VRCON_bits.VROE
704 #define VREN                 VRCON_bits.VREN
705 #endif /* NO_BIT_DEFINES */
706
707 #endif