CVS: msp430-libc/include/msp430 gpio.h,1.7,1.8
"Chris Liechti" <[email protected]> Thu, 4 Jun 2009 21:34:31 +0000
| Newsgroups | gmane.comp.hardware.texas-instruments.msp430.gcc.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/mspgcc/msp430-libc/include/msp430 In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv9432/include/msp430 Modified Files: gpio.h Log Message: - _MSP430_HAS_PORT??_R__ updated in msp430x47xx.h file - __MSP430_HAS_PORT9_R__ and __MSP430_HAS_PORT10_R__ added in gpio.h file Thanks to Thierry Index: gpio.h =================================================================== RCS file: /cvsroot/mspgcc/msp430-libc/include/msp430/gpio.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -w -d -r1.7 -r1.8 --- gpio.h 16 Jun 2008 23:22:19 -0000 1.7 +++ gpio.h 4 Jun 2009 21:34:29 -0000 1.8 @@ -8,6 +8,10 @@ * mspgcc project: MSP430 device headers * GPIO module header * + * 2009-06-04 - THLN + * - for msp430x47xx + * - __MSP430_HAS_PORT9_R__ and __MSP430_HAS_PORT10_R__ added + * * 2008-06-04 - TonyB ([email protected]) * - for msp430x2618 (and possibly others) * - define __MSP430_HAS_PORT7_R__ and __MSP430_HAS_PORT7_R__ @@ -37,13 +41,18 @@ __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_PORTA__ - if device has port A (16 bit view of ports +7 & 8) __MSP430_HAS_PORT9__ - if device has port 9 +__MSP430_HAS_PORT9_R__ - if device has port 9 with pull-downs __MSP430_HAS_PORT10__ - if device has port 10 -__MSP430_HAS_PORTB__ - if device has port B (16 bit view of ports 9 & 10) +__MSP430_HAS_PORT10_R__ - if device has port 10 with pull-downs +__MSP430_HAS_PORTB__ - if device has port B (16 bit view of ports +9 & 10) Note: these only make sense if the port itself is present. Also note that -the port resistor enable registers for ports 3-6 overlap with port 0 registers, +the port resistor enable registers for ports 3-6 overlap with port 0 +registers, so any device that has these resistors will not have port 0. */ @@ -254,7 +263,7 @@ sfrb(PAIN, PAIN_); #endif -#if defined(__MSP430_HAS_PORT9__) +#if defined(__MSP430_HAS_PORT9__) || defined(__MSP430_HAS_PORT9_R__) #define P9IN_ 0x0008 /* Port 9 Input */ sfrb(P9IN, P9IN_); #define P9OUT_ 0x000A /* Port 9 Output */ @@ -263,9 +272,15 @@ sfrb(P9DIR, P9DIR_); #define P9SEL_ 0x000E /* Port 9 Selection */ sfrb(P9SEL, P9SEL_); + +#if defined(__MSP430_HAS_PORT9_R__) +#define P9REN_ 0x0016 /* Port 9 Resistor enable */ +sfrb(P9REN, P9REN_); #endif -#if defined(__MSP430_HAS_PORT10__) +#endif + +#if defined(__MSP430_HAS_PORT10__) || defined(__MSP430_HAS_PORT10_R__) #define P10IN_ 0x0009 /* Port 10 Input */ sfrb(P10IN, P10IN_); #define P10OUT_ 0x000B /* Port 10 Output */ @@ -274,6 +289,12 @@ sfrb(P10DIR, P10DIR_); #define P10SEL_ 0x000F /* Port 10 Selection */ sfrb(P10SEL, P10SEL_); + +#if defined(__MSP430_HAS_PORT10_R__) +#define P10REN_ 0x0017 /* Port 10 Resistor enable */ +sfrb(P10REN, P10REN_); +#endif + #endif #if defined(__MSP430_HAS_PORTB__) ------------------------------------------------------------------------------ OpenSolaris 2009.06 is a cutting edge operating system for enterprises looking to deploy the next generation of Solaris that includes the latest innovations from Sun and the OpenSource community. Download a copy and enjoy capabilities such as Networking, Storage and Virtualization. Go to: http://p.sf.net/sfu/opensolaris-get