From: tecodev Date: Mon, 4 Sep 2006 23:33:29 +0000 (+0000) Subject: * device/lib/pic16/libdev/pic18f4550.c, X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=9ed43a4f6e8e2c78b767abd5ec041e78e1ca115d;p=fw%2Fsdcc * device/lib/pic16/libdev/pic18f4550.c, device/include/pic16/pic18f4550.h: added PORTD/TRISD declarations/definitions from patch #1520949 git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@4360 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- diff --git a/ChangeLog b/ChangeLog index 54e7aa36..43419e56 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,12 @@ 2006-09-05 Raphael Neider - * src/pic16/gen.c (genPackBits): fix assignemnt to 8-bit, + * device/lib/pic16/libdev/pic18f4550.c, + device/include/pic16/pic18f4550.h: added PORTD/TRISD + declarations/definitions from patch #1520949 + +2006-09-05 Raphael Neider + + * src/pic16/gen.c (genPackBits): fix assignment to 8-bit, byte-aligned bitfields, fixes #1539278 2006-09-05 Raphael Neider diff --git a/device/include/pic16/pic18f4550.h b/device/include/pic16/pic18f4550.h index be07f59a..50df0509 100644 --- a/device/include/pic16/pic18f4550.h +++ b/device/include/pic16/pic18f4550.h @@ -551,6 +551,35 @@ typedef union { } __PORTC_t; extern volatile __PORTC_t __at (0xF82) PORTCbits; +extern __sfr __at (0xF83) PORTD; +typedef union { + struct { + unsigned RD0 : 1; + unsigned RD1 : 1; + unsigned RD2 : 1; + unsigned RD3 : 1; + unsigned RD4 : 1; + unsigned RD5 : 1; + unsigned RD6 : 1; + unsigned RD7 : 1; + }; + struct { + unsigned RD : 8; + }; + /* aliases */ + struct { + unsigned :1; + unsigned :1; + unsigned :1; + unsigned :1; + unsigned :1; + unsigned ECCPB :1; + unsigned ECCPC :1; + unsigned ECCPD :1; + }; +} __PORTD_t; +extern volatile __PORTD_t __at (0xF83) PORTDbits; + extern __sfr __at (0xF84) PORTE; typedef union { struct { @@ -670,6 +699,21 @@ typedef union { } __TRISC_t; extern volatile __TRISC_t __at (0xF94) TRISCbits; +extern __sfr __at (0xF95) TRISD; +typedef union { + struct { + unsigned TRISD0 : 1; + unsigned TRISD1 : 1; + unsigned TRISD2 : 1; + unsigned TRISD3 : 1; + unsigned TRISD4 : 1; + unsigned TRISD5 : 1; + unsigned TRISD6 : 1; + unsigned TRISD7 : 1; + }; +} __TRISD_t; +extern volatile __TRISD_t __at (0xF95) TRISDbits; + extern __sfr __at (0xF9B) OSCTUNE; typedef union { struct { diff --git a/device/lib/pic16/libdev/pic18f4550.c b/device/lib/pic16/libdev/pic18f4550.c index 1814cf6a..ff3f1921 100644 --- a/device/lib/pic16/libdev/pic18f4550.c +++ b/device/lib/pic16/libdev/pic18f4550.c @@ -115,6 +115,9 @@ volatile __PORTB_t __at (0xF81) PORTBbits; __sfr __at (0xF82) PORTC; volatile __PORTC_t __at (0xF82) PORTCbits; +__sfr __at (0xF83) PORTD; +volatile __PORTD_t __at (0xF83) PORTDbits; + __sfr __at (0xF84) PORTE; volatile __PORTE_t __at (0xF84) PORTEbits; @@ -136,6 +139,9 @@ volatile __TRISB_t __at (0xF93) TRISBbits; __sfr __at (0xF94) TRISC; volatile __TRISC_t __at (0xF94) TRISCbits; +__sfr __at (0xF95) TRISD; +volatile __TRISD_t __at (0xF95) TRISDbits; + __sfr __at (0xF9B) OSCTUNE; volatile __OSCTUNE_t __at (0xF9B) OSCTUNEbits;