CVS: msp430-libc/include/msp430 gpio.h,1.6,1.7
Chris Liechti <[email protected]> Mon, 16 Jun 2008 16:22:22 -0700
| Newsgroups | gmane.comp.hardware.texas-instruments.msp430.gcc.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/mspgcc/msp430-libc/include/msp430 In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv28554/msp430 Modified Files: gpio.h Log Message: patch from TonyB Index: gpio.h =================================================================== RCS file: /cvsroot/mspgcc/msp430-libc/include/msp430/gpio.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -w -d -r1.6 -r1.7 --- gpio.h 25 Jan 2006 16:19:12 -0000 1.6 +++ gpio.h 16 Jun 2008 23:22:19 -0000 1.7 @@ -8,6 +8,10 @@ * mspgcc project: MSP430 device headers * GPIO module header * + * 2008-06-04 - TonyB ([email protected]) + * - for msp430x2618 (and possibly others) + * - define __MSP430_HAS_PORT7_R__ and __MSP430_HAS_PORT7_R__ + * * (c) 2002 by M. P. Ashton <[email protected]> * Originally based in part on work by Texas Instruments Inc. * @@ -26,9 +30,13 @@ __MSP430_HAS_PORT4__ - if device has port 4 __MSP430_HAS_PORT4_R__ - if device has port 4 with pull-downs __MSP430_HAS_PORT5__ - if device has port 5 +__MSP430_HAS_PORT5_R__ - if device has port 5 with pull-downs __MSP430_HAS_PORT6__ - if device has port 6 +__MSP430_HAS_PORT6_R__ - if device has port 6 with pull-downs __MSP430_HAS_PORT7__ - if device has port 7 +__MSP430_HAS_PORT7_R__ - if device has port 7 with pull-downs __MSP430_HAS_PORT8__ - if device has port 8 +__MSP430_HAS_PORT8_R__ - if device has port 8 with pull-downs __MSP430_HAS_PORTA__ - if device has port A (16 bit view of ports 7 & 8) __MSP430_HAS_PORT9__ - if device has port 9 __MSP430_HAS_PORT10__ - if device has port 10 @@ -211,7 +219,7 @@ #endif #endif -#if defined(__MSP430_HAS_PORT7__) +#if defined(__MSP430_HAS_PORT7__) || defined(__MSP430_HAS_PORT7_R__) #define P7IN_ 0x0038 /* Port 7 Input */ sfrb(P7IN, P7IN_); #define P7OUT_ 0x003A /* Port 7 Output */ @@ -220,9 +228,13 @@ sfrb(P7DIR, P7DIR_); #define P7SEL_ 0x003E /* Port 7 Selection */ sfrb(P7SEL, P7SEL_); +#if defined(__MSP430_HAS_PORT7_R__) +#define P7REN_ 0x0014 /* Port 7 Resistor enable */ +sfrb(P7REN, P7REN_); +#endif #endif -#if defined(__MSP430_HAS_PORT8__) +#if defined(__MSP430_HAS_PORT8__) || defined(__MSP430_HAS_PORT8_R__) #define P8IN_ 0x0039 /* Port 8 Input */ sfrb(P8IN, P8IN_); #define P8OUT_ 0x003B /* Port 8 Output */ @@ -231,6 +243,10 @@ sfrb(P8DIR, P8DIR_); #define P8SEL_ 0x003F /* Port 8 Selection */ sfrb(P8SEL, P8SEL_); +#if defined(__MSP430_HAS_PORT8_R__) +#define P8REN_ 0x0015 /* Port 8 Resistor enable */ +sfrb(P8REN, P8REN_); +#endif #endif #if defined(__MSP430_HAS_PORTA__) ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php