* device/include/pic16/pic18f*.h: add bit aliases in INTCONbits_t
[fw/sdcc] / device / include / pic / pic16c71.h
index 25ebad373129d67040d109c1f20f7ab7264d4e55..9786e12d74d5181af71834cc20e416c0ed62dd67 100644 (file)
@@ -4,7 +4,7 @@
 //
 // This header file was automatically generated by:
 //
-//     inc2h.pl V1.6
+//     inc2h.pl V4783
 //
 //     Copyright (c) 2002, Kevin L. Pauba, All Rights Reserved
 //
 // Memory organization.
 //
 
-#pragma memmap INDF_ADDR INDF_ADDR SFR 0x000   // INDF
-#pragma memmap TMR0_ADDR TMR0_ADDR SFR 0x000   // TMR0
-#pragma memmap PCL_ADDR PCL_ADDR SFR 0x000     // PCL
-#pragma memmap STATUS_ADDR STATUS_ADDR SFR 0x000       // STATUS
-#pragma memmap FSR_ADDR FSR_ADDR SFR 0x000     // FSR
-#pragma memmap PORTA_ADDR PORTA_ADDR SFR 0x000 // PORTA
-#pragma memmap PORTB_ADDR PORTB_ADDR SFR 0x000 // PORTB
-#pragma memmap ADCON0_ADDR ADCON0_ADDR SFR 0x000       // ADCON0
-#pragma memmap ADRES_ADDR ADRES_ADDR SFR 0x000 // ADRES
-#pragma memmap PCLATH_ADDR PCLATH_ADDR SFR 0x000       // PCLATH
-#pragma memmap INTCON_ADDR INTCON_ADDR SFR 0x000       // INTCON
-#pragma memmap OPTION_REG_ADDR OPTION_REG_ADDR SFR 0x000       // OPTION_REG
-#pragma memmap TRISA_ADDR TRISA_ADDR SFR 0x000 // TRISA
-#pragma memmap TRISB_ADDR TRISB_ADDR SFR 0x000 // TRISB
-#pragma memmap ADCON1_ADDR ADCON1_ADDR SFR 0x000       // ADCON1
 
 
 //         LIST
 
 //----- Register Files------------------------------------------------------
 
-extern data __at (INDF_ADDR) volatile char      INDF;
-extern sfr  __at (TMR0_ADDR)                    TMR0;
-extern data __at (PCL_ADDR) volatile char       PCL;
-extern sfr  __at (STATUS_ADDR)                  STATUS;
-extern sfr  __at (FSR_ADDR)                     FSR;
-extern sfr  __at (PORTA_ADDR)                   PORTA;
-extern sfr  __at (PORTB_ADDR)                   PORTB;
-extern sfr  __at (ADCON0_ADDR)                  ADCON0;
-extern sfr  __at (ADRES_ADDR)                   ADRES;
-extern sfr  __at (PCLATH_ADDR)                  PCLATH;
-extern sfr  __at (INTCON_ADDR)                  INTCON;
-
-extern sfr  __at (OPTION_REG_ADDR)              OPTION_REG;
-extern sfr  __at (TRISA_ADDR)                   TRISA;
-extern sfr  __at (TRISB_ADDR)                   TRISB;
-extern sfr  __at (ADCON1_ADDR)                  ADCON1;
+extern __sfr  __at (INDF_ADDR)                    INDF;
+extern __sfr  __at (TMR0_ADDR)                    TMR0;
+extern __sfr  __at (PCL_ADDR)                     PCL;
+extern __sfr  __at (STATUS_ADDR)                  STATUS;
+extern __sfr  __at (FSR_ADDR)                     FSR;
+extern __sfr  __at (PORTA_ADDR)                   PORTA;
+extern __sfr  __at (PORTB_ADDR)                   PORTB;
+extern __sfr  __at (ADCON0_ADDR)                  ADCON0;
+extern __sfr  __at (ADRES_ADDR)                   ADRES;
+extern __sfr  __at (PCLATH_ADDR)                  PCLATH;
+extern __sfr  __at (INTCON_ADDR)                  INTCON;
+
+extern __sfr  __at (OPTION_REG_ADDR)              OPTION_REG;
+extern __sfr  __at (TRISA_ADDR)                   TRISA;
+extern __sfr  __at (TRISB_ADDR)                   TRISB;
+extern __sfr  __at (ADCON1_ADDR)                  ADCON1;
 
 //----- STATUS Bits --------------------------------------------------------
 
@@ -205,6 +190,7 @@ typedef union {
 } __ADCON0_bits_t;
 extern volatile __ADCON0_bits_t __at(ADCON0_ADDR) ADCON0_bits;
 
+#ifndef NO_BIT_DEFINES
 #define ADON                 ADCON0_bits.ADON
 #define ADIF                 ADCON0_bits.ADIF
 #define GO                   ADCON0_bits.GO
@@ -214,6 +200,7 @@ extern volatile __ADCON0_bits_t __at(ADCON0_ADDR) ADCON0_bits;
 #define CHS1                 ADCON0_bits.CHS1
 #define ADCS0                ADCON0_bits.ADCS0
 #define ADCS1                ADCON0_bits.ADCS1
+#endif /* NO_BIT_DEFINES */
 
 // ----- ADCON1 bits --------------------
 typedef union {
@@ -230,8 +217,10 @@ typedef union {
 } __ADCON1_bits_t;
 extern volatile __ADCON1_bits_t __at(ADCON1_ADDR) ADCON1_bits;
 
+#ifndef NO_BIT_DEFINES
 #define PCFG0                ADCON1_bits.PCFG0
 #define PCFG1                ADCON1_bits.PCFG1
+#endif /* NO_BIT_DEFINES */
 
 // ----- INTCON bits --------------------
 typedef union {
@@ -248,6 +237,7 @@ typedef union {
 } __INTCON_bits_t;
 extern volatile __INTCON_bits_t __at(INTCON_ADDR) INTCON_bits;
 
+#ifndef NO_BIT_DEFINES
 #define RBIF                 INTCON_bits.RBIF
 #define INTF                 INTCON_bits.INTF
 #define T0IF                 INTCON_bits.T0IF
@@ -256,6 +246,7 @@ extern volatile __INTCON_bits_t __at(INTCON_ADDR) INTCON_bits;
 #define T0IE                 INTCON_bits.T0IE
 #define ADIE                 INTCON_bits.ADIE
 #define GIE                  INTCON_bits.GIE
+#endif /* NO_BIT_DEFINES */
 
 // ----- OPTION_REG bits --------------------
 typedef union {
@@ -272,6 +263,7 @@ typedef union {
 } __OPTION_REG_bits_t;
 extern volatile __OPTION_REG_bits_t __at(OPTION_REG_ADDR) OPTION_REG_bits;
 
+#ifndef NO_BIT_DEFINES
 #define PS0                  OPTION_REG_bits.PS0
 #define PS1                  OPTION_REG_bits.PS1
 #define PS2                  OPTION_REG_bits.PS2
@@ -280,6 +272,57 @@ extern volatile __OPTION_REG_bits_t __at(OPTION_REG_ADDR) OPTION_REG_bits;
 #define T0CS                 OPTION_REG_bits.T0CS
 #define INTEDG               OPTION_REG_bits.INTEDG
 #define NOT_RBPU             OPTION_REG_bits.NOT_RBPU
+#endif /* NO_BIT_DEFINES */
+
+// ----- PORTA bits --------------------
+typedef union {
+  struct {
+    unsigned char RA0:1;
+    unsigned char RA1:1;
+    unsigned char RA2:1;
+    unsigned char RA3:1;
+    unsigned char RA4:1;
+    unsigned char RA5:1;
+    unsigned char :1;
+    unsigned char :1;
+  };
+} __PORTA_bits_t;
+extern volatile __PORTA_bits_t __at(PORTA_ADDR) PORTA_bits;
+
+#ifndef NO_BIT_DEFINES
+#define RA0                  PORTA_bits.RA0
+#define RA1                  PORTA_bits.RA1
+#define RA2                  PORTA_bits.RA2
+#define RA3                  PORTA_bits.RA3
+#define RA4                  PORTA_bits.RA4
+#define RA5                  PORTA_bits.RA5
+#endif /* NO_BIT_DEFINES */
+
+// ----- PORTB bits --------------------
+typedef union {
+  struct {
+    unsigned char RB0:1;
+    unsigned char RB1:1;
+    unsigned char RB2:1;
+    unsigned char RB3:1;
+    unsigned char RB4:1;
+    unsigned char RB5:1;
+    unsigned char RB6:1;
+    unsigned char RB7:1;
+  };
+} __PORTB_bits_t;
+extern volatile __PORTB_bits_t __at(PORTB_ADDR) PORTB_bits;
+
+#ifndef NO_BIT_DEFINES
+#define RB0                  PORTB_bits.RB0
+#define RB1                  PORTB_bits.RB1
+#define RB2                  PORTB_bits.RB2
+#define RB3                  PORTB_bits.RB3
+#define RB4                  PORTB_bits.RB4
+#define RB5                  PORTB_bits.RB5
+#define RB6                  PORTB_bits.RB6
+#define RB7                  PORTB_bits.RB7
+#endif /* NO_BIT_DEFINES */
 
 // ----- STATUS bits --------------------
 typedef union {
@@ -296,6 +339,7 @@ typedef union {
 } __STATUS_bits_t;
 extern volatile __STATUS_bits_t __at(STATUS_ADDR) STATUS_bits;
 
+#ifndef NO_BIT_DEFINES
 #define C                    STATUS_bits.C
 #define DC                   STATUS_bits.DC
 #define Z                    STATUS_bits.Z
@@ -304,5 +348,56 @@ extern volatile __STATUS_bits_t __at(STATUS_ADDR) STATUS_bits;
 #define RP0                  STATUS_bits.RP0
 #define RP1                  STATUS_bits.RP1
 #define IRP                  STATUS_bits.IRP
+#endif /* NO_BIT_DEFINES */
+
+// ----- TRISA bits --------------------
+typedef union {
+  struct {
+    unsigned char TRISA0:1;
+    unsigned char TRISA1:1;
+    unsigned char TRISA2:1;
+    unsigned char TRISA3:1;
+    unsigned char TRISA4:1;
+    unsigned char TRISA5:1;
+    unsigned char :1;
+    unsigned char :1;
+  };
+} __TRISA_bits_t;
+extern volatile __TRISA_bits_t __at(TRISA_ADDR) TRISA_bits;
+
+#ifndef NO_BIT_DEFINES
+#define TRISA0               TRISA_bits.TRISA0
+#define TRISA1               TRISA_bits.TRISA1
+#define TRISA2               TRISA_bits.TRISA2
+#define TRISA3               TRISA_bits.TRISA3
+#define TRISA4               TRISA_bits.TRISA4
+#define TRISA5               TRISA_bits.TRISA5
+#endif /* NO_BIT_DEFINES */
+
+// ----- TRISB bits --------------------
+typedef union {
+  struct {
+    unsigned char TRISB0:1;
+    unsigned char TRISB1:1;
+    unsigned char TRISB2:1;
+    unsigned char TRISB3:1;
+    unsigned char TRISB4:1;
+    unsigned char TRISB5:1;
+    unsigned char TRISB6:1;
+    unsigned char TRISB7:1;
+  };
+} __TRISB_bits_t;
+extern volatile __TRISB_bits_t __at(TRISB_ADDR) TRISB_bits;
+
+#ifndef NO_BIT_DEFINES
+#define TRISB0               TRISB_bits.TRISB0
+#define TRISB1               TRISB_bits.TRISB1
+#define TRISB2               TRISB_bits.TRISB2
+#define TRISB3               TRISB_bits.TRISB3
+#define TRISB4               TRISB_bits.TRISB4
+#define TRISB5               TRISB_bits.TRISB5
+#define TRISB6               TRISB_bits.TRISB6
+#define TRISB7               TRISB_bits.TRISB7
+#endif /* NO_BIT_DEFINES */
 
 #endif