X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=device%2Finclude%2Fpic%2Fpic16f72.h;h=8f986197e30336c034ede993dd3a3c86ed4859ed;hb=eae1bd2f705a2c61e143c539f8c4d1e9c2b4efe6;hp=51f10829d6a1545e75a3c2e41cca7e753c8c31ea;hpb=f970f0e6603401042048d98927927133a0f9f255;p=fw%2Fsdcc diff --git a/device/include/pic/pic16f72.h b/device/include/pic/pic16f72.h index 51f10829..8f986197 100644 --- a/device/include/pic/pic16f72.h +++ b/device/include/pic/pic16f72.h @@ -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 // @@ -118,9 +118,9 @@ //----- Register Files------------------------------------------------------ -extern __data __at (INDF_ADDR) volatile char INDF; +extern __sfr __at (INDF_ADDR) INDF; extern __sfr __at (TMR0_ADDR) TMR0; -extern __data __at (PCL_ADDR) volatile char PCL; +extern __sfr __at (PCL_ADDR) PCL; extern __sfr __at (STATUS_ADDR) STATUS; extern __sfr __at (FSR_ADDR) FSR; extern __sfr __at (PORTA_ADDR) PORTA; @@ -275,6 +275,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 GO ADCON0_bits.GO #define NOT_DONE ADCON0_bits.NOT_DONE @@ -284,6 +285,7 @@ extern volatile __ADCON0_bits_t __at(ADCON0_ADDR) ADCON0_bits; #define CHS2 ADCON0_bits.CHS2 #define ADCS0 ADCON0_bits.ADCS0 #define ADCS1 ADCON0_bits.ADCS1 +#endif /* NO_BIT_DEFINES */ // ----- ADCON1 bits -------------------- typedef union { @@ -300,9 +302,11 @@ 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 #define PCFG2 ADCON1_bits.PCFG2 +#endif /* NO_BIT_DEFINES */ // ----- CCP1CON bits -------------------- typedef union { @@ -319,12 +323,14 @@ typedef union { } __CCP1CON_bits_t; extern volatile __CCP1CON_bits_t __at(CCP1CON_ADDR) CCP1CON_bits; +#ifndef NO_BIT_DEFINES #define CCP1M0 CCP1CON_bits.CCP1M0 #define CCP1M1 CCP1CON_bits.CCP1M1 #define CCP1M2 CCP1CON_bits.CCP1M2 #define CCP1M3 CCP1CON_bits.CCP1M3 #define CCP1Y CCP1CON_bits.CCP1Y #define CCP1X CCP1CON_bits.CCP1X +#endif /* NO_BIT_DEFINES */ // ----- INTCON bits -------------------- typedef union { @@ -351,6 +357,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 TMR0IF INTCON_bits.TMR0IF @@ -361,6 +368,7 @@ extern volatile __INTCON_bits_t __at(INTCON_ADDR) INTCON_bits; #define T0IE INTCON_bits.T0IE #define PEIE INTCON_bits.PEIE #define GIE INTCON_bits.GIE +#endif /* NO_BIT_DEFINES */ // ----- OPTION_REG bits -------------------- typedef union { @@ -377,6 +385,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 @@ -385,6 +394,7 @@ 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 */ // ----- PCON bits -------------------- typedef union { @@ -411,9 +421,11 @@ typedef union { } __PCON_bits_t; extern volatile __PCON_bits_t __at(PCON_ADDR) PCON_bits; +#ifndef NO_BIT_DEFINES #define NOT_BO PCON_bits.NOT_BO #define NOT_BOR PCON_bits.NOT_BOR #define NOT_POR PCON_bits.NOT_POR +#endif /* NO_BIT_DEFINES */ // ----- PIE1 bits -------------------- typedef union { @@ -430,11 +442,13 @@ typedef union { } __PIE1_bits_t; extern volatile __PIE1_bits_t __at(PIE1_ADDR) PIE1_bits; +#ifndef NO_BIT_DEFINES #define TMR1IE PIE1_bits.TMR1IE #define TMR2IE PIE1_bits.TMR2IE #define CCP1IE PIE1_bits.CCP1IE #define SSPIE PIE1_bits.SSPIE #define ADIE PIE1_bits.ADIE +#endif /* NO_BIT_DEFINES */ // ----- PIR1 bits -------------------- typedef union { @@ -451,11 +465,13 @@ typedef union { } __PIR1_bits_t; extern volatile __PIR1_bits_t __at(PIR1_ADDR) PIR1_bits; +#ifndef NO_BIT_DEFINES #define TMR1IF PIR1_bits.TMR1IF #define TMR2IF PIR1_bits.TMR2IF #define CCP1IF PIR1_bits.CCP1IF #define SSPIF PIR1_bits.SSPIF #define ADIF PIR1_bits.ADIF +#endif /* NO_BIT_DEFINES */ // ----- PMCON1 bits -------------------- typedef union { @@ -472,7 +488,85 @@ typedef union { } __PMCON1_bits_t; extern volatile __PMCON1_bits_t __at(PMCON1_ADDR) PMCON1_bits; +#ifndef NO_BIT_DEFINES #define RD PMCON1_bits.RD +#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 */ + +// ----- PORTC bits -------------------- +typedef union { + struct { + unsigned char RC0:1; + unsigned char RC1:1; + unsigned char RC2:1; + unsigned char RC3:1; + unsigned char RC4:1; + unsigned char RC5:1; + unsigned char RC6:1; + unsigned char RC7:1; + }; +} __PORTC_bits_t; +extern volatile __PORTC_bits_t __at(PORTC_ADDR) PORTC_bits; + +#ifndef NO_BIT_DEFINES +#define RC0 PORTC_bits.RC0 +#define RC1 PORTC_bits.RC1 +#define RC2 PORTC_bits.RC2 +#define RC3 PORTC_bits.RC3 +#define RC4 PORTC_bits.RC4 +#define RC5 PORTC_bits.RC5 +#define RC6 PORTC_bits.RC6 +#define RC7 PORTC_bits.RC7 +#endif /* NO_BIT_DEFINES */ // ----- SSPCON bits -------------------- typedef union { @@ -489,6 +583,7 @@ typedef union { } __SSPCON_bits_t; extern volatile __SSPCON_bits_t __at(SSPCON_ADDR) SSPCON_bits; +#ifndef NO_BIT_DEFINES #define SSPM0 SSPCON_bits.SSPM0 #define SSPM1 SSPCON_bits.SSPM1 #define SSPM2 SSPCON_bits.SSPM2 @@ -497,6 +592,7 @@ extern volatile __SSPCON_bits_t __at(SSPCON_ADDR) SSPCON_bits; #define SSPEN SSPCON_bits.SSPEN #define SSPOV SSPCON_bits.SSPOV #define WCOL SSPCON_bits.WCOL +#endif /* NO_BIT_DEFINES */ // ----- SSPSTAT bits -------------------- typedef union { @@ -563,6 +659,7 @@ typedef union { } __SSPSTAT_bits_t; extern volatile __SSPSTAT_bits_t __at(SSPSTAT_ADDR) SSPSTAT_bits; +#ifndef NO_BIT_DEFINES #define BF SSPSTAT_bits.BF #define UA SSPSTAT_bits.UA #define R SSPSTAT_bits.R @@ -583,6 +680,7 @@ extern volatile __SSPSTAT_bits_t __at(SSPSTAT_ADDR) SSPSTAT_bits; #define DATA_ADDRESS SSPSTAT_bits.DATA_ADDRESS #define CKE SSPSTAT_bits.CKE #define SMP SSPSTAT_bits.SMP +#endif /* NO_BIT_DEFINES */ // ----- STATUS bits -------------------- typedef union { @@ -599,6 +697,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 @@ -607,6 +706,7 @@ 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 */ // ----- T1CON bits -------------------- typedef union { @@ -633,6 +733,7 @@ typedef union { } __T1CON_bits_t; extern volatile __T1CON_bits_t __at(T1CON_ADDR) T1CON_bits; +#ifndef NO_BIT_DEFINES #define TMR1ON T1CON_bits.TMR1ON #define TMR1CS T1CON_bits.TMR1CS #define NOT_T1SYNC T1CON_bits.NOT_T1SYNC @@ -640,6 +741,7 @@ extern volatile __T1CON_bits_t __at(T1CON_ADDR) T1CON_bits; #define T1OSCEN T1CON_bits.T1OSCEN #define T1CKPS0 T1CON_bits.T1CKPS0 #define T1CKPS1 T1CON_bits.T1CKPS1 +#endif /* NO_BIT_DEFINES */ // ----- T2CON bits -------------------- typedef union { @@ -656,6 +758,7 @@ typedef union { } __T2CON_bits_t; extern volatile __T2CON_bits_t __at(T2CON_ADDR) T2CON_bits; +#ifndef NO_BIT_DEFINES #define T2CKPS0 T2CON_bits.T2CKPS0 #define T2CKPS1 T2CON_bits.T2CKPS1 #define TMR2ON T2CON_bits.TMR2ON @@ -663,5 +766,82 @@ extern volatile __T2CON_bits_t __at(T2CON_ADDR) T2CON_bits; #define TOUTPS1 T2CON_bits.TOUTPS1 #define TOUTPS2 T2CON_bits.TOUTPS2 #define TOUTPS3 T2CON_bits.TOUTPS3 +#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 */ + +// ----- TRISC bits -------------------- +typedef union { + struct { + unsigned char TRISC0:1; + unsigned char TRISC1:1; + unsigned char TRISC2:1; + unsigned char TRISC3:1; + unsigned char TRISC4:1; + unsigned char TRISC5:1; + unsigned char TRISC6:1; + unsigned char TRISC7:1; + }; +} __TRISC_bits_t; +extern volatile __TRISC_bits_t __at(TRISC_ADDR) TRISC_bits; + +#ifndef NO_BIT_DEFINES +#define TRISC0 TRISC_bits.TRISC0 +#define TRISC1 TRISC_bits.TRISC1 +#define TRISC2 TRISC_bits.TRISC2 +#define TRISC3 TRISC_bits.TRISC3 +#define TRISC4 TRISC_bits.TRISC4 +#define TRISC5 TRISC_bits.TRISC5 +#define TRISC6 TRISC_bits.TRISC6 +#define TRISC7 TRISC_bits.TRISC7 +#endif /* NO_BIT_DEFINES */ #endif