]> oss.titaniummirror.com Git - msp430-libc.git/blobdiff - include/msp430/common.h
Imported msp430-libc-20100207
[msp430-libc.git] / include / msp430 / common.h
index cdaf82c6f8de441c9cc8195d45381ab43dcd41cb..b49701f1343d920d121ca7339926524fd51692bf 100644 (file)
@@ -10,7 +10,7 @@
  * (c) 2002 by M. P. Ashton <data@ieee.org>
  * Originally based in part on work by Texas Instruments Inc.
  *
- * $Id: common.h,v 1.5 2006/01/12 00:47:21 cliechti Exp $
+ * $Id: common.h,v 1.6 2008/10/09 15:00:14 sb-sf Exp $
  */
 
 /* Switches: none */
@@ -42,7 +42,7 @@
 #define SCG0                0x0040
 #define SCG1                0x0080
 
-#ifdef _GNU_ASSEMBLER_ /* Begin #defines for assembler */
+#ifdef __ASSEMBLER__ /* Begin #defines for assembler */
 #define LPM0                CPUOFF
 #define LPM1                SCG0+CPUOFF
 #define LPM2                SCG1+CPUOFF
 #define LPM4_EXIT _BIC_SR_IRQ(LPM4_bits) /* Exit Low Power Mode 4 */
 #endif /* End #defines for C */
 
+#if ! defined(__MSP430_WDT_A_BASE__)
+/* Excluded for 5xx architectures where watchdog timer is at a
+ * different address.   Use <msp430/wdt_a.h>. */
+
 #define WDTCTL_             0x0120  /* Watchdog Timer Control */
 sfrw (WDTCTL,WDTCTL_);
 /* The bit names have been prefixed with "WDT" */
@@ -115,6 +119,7 @@ sfrw (WDTCTL,WDTCTL_);
 #define WDTIS_2              0x0002
 #define WDTIS_3              0x0003
 
+#endif /* __MSP430_WDT_A_BASE__ */
 
 /* Backwards compatibility to older versions of the header files.
    Please consider using the new names.
@@ -151,4 +156,13 @@ sfrw (WDTCTL,WDTCTL_);
     #define __msp430_have_timerb7
 #endif
 
+/* Compatibity with TI standard definitions */
+#if defined(__MSP430X2__)
+#define __MSP430_HAS_MSP430XV2_CPU__ 1
+#endif
+
+#if defined(__MSP430X__)
+#define __MSP430_HAS_MSP430X_CPU__ 1
+#endif
+
 #endif