TonyB wrote:

> I'm using mspgcc for programming an x2618 mcu. I've had to make a few
> changes to the header files for this chip. Below is the diff for these
> files, compared to a CVS snapshot from just minutes ago, and I'll attach
> these files as well in case the server doesn't strip them. If someone
> could review these and put these in CVS I'm sure they may be useful to
> others.
> 

  I've taken the freedom to convert your patch to a unified diff format, so
it's easiest to read and apply.

  Regards,
> 
> Thanks,
> 
> TonyB
> 
-- 
Raúl Sánchez Siles
Index: msp430x261x.h
===================================================================
RCS file: /cvsroot/mspgcc/msp430-libc/include/msp430x261x.h,v
retrieving revision 1.3
diff -u -r1.3 msp430x261x.h
--- msp430x261x.h	26 May 2008 20:27:52 -0000	1.3
+++ msp430x261x.h	10 Jun 2008 08:34:21 -0000
@@ -9,6 +9,8 @@
  * (c) 2007 by Steve Underwood <ste...@coppice.org>
  * Originally based in part on work by Texas Instruments Inc.
  *
+ * 2008-06-04 - TonyB (tony.borr...@gmail.com)
+ * - Defined __MSP430_HAS_PORT7_R__ and __MSP430_HAS_PORT8_R__
  *
  * 2008-03-05 - modifications by MB <mbar...@inf.ed.ac.uk>, based on msp430x24x.h (G.Lemm) and original msp430x24x (Steve Underwood).
  * - defined __DisableCalData to get rid of assembler errors 
@@ -33,6 +35,8 @@
 #define __MSP430_HAS_PORT4_R__
 #define __MSP430_HAS_PORT5_R__
 #define __MSP430_HAS_PORT6_R__
+#define __MSP430_HAS_PORT7_R__
+#define __MSP430_HAS_PORT8_R__
 #define __MSP430_HAS_SVS__
 #define __MSP430_HAS_USCI__
 #define __MSP430_HAS_USCI1__
Index: msp430/gpio.h
===================================================================
RCS file: /cvsroot/mspgcc/msp430-libc/include/msp430/gpio.h,v
retrieving revision 1.6
diff -u -r1.6 gpio.h
--- msp430/gpio.h	25 Jan 2006 16:19:12 -0000	1.6
+++ msp430/gpio.h	10 Jun 2008 08:34:21 -0000
@@ -7,6 +7,10 @@
  *
  * mspgcc project: MSP430 device headers
  * GPIO module header
+ * 
+ * 2008-06-04 - TonyB (tony.borr...@gmail.com)
+ * - for msp430x2618 (and possibly others)
+ *     - define __MSP430_HAS_PORT7_R__ and __MSP430_HAS_PORT7_R__
  *
  * (c) 2002 by M. P. Ashton <d...@ieee.org>
  * 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__)

Reply via email to