]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/msp430/msp430hardware.h
Redefinitions for safe tinyos. With this patch, it so no longer necessary to modify...
[tinyos-2.x.git] / tos / chips / msp430 / msp430hardware.h
index 1a5cc8b9f93158c7615369ede5ec6f6b1e31bd81..c7a96d0495d5fe4e599964f05c84dfe8b5080556 100644 (file)
@@ -123,6 +123,17 @@ to_type func_name(from_type x) { union {from_type f; to_type t;} c = {f:x}; retu
 #undef signal
 #endif
 
+
+// Re-definitions for safe tinyOS
+// These rely on io.h being included at the top of this file
+// thus pulling the affected header files before the re-definitions
+#ifdef SAFE_TINYOS
+#undef ADC12MEM
+#define ADC12MEM            TCAST(int* ONE, ADC12MEM_) /* ADC12 Conversion Memory (for C) */
+#undef ADC12MCTL
+#define ADC12MCTL           TCAST(char * ONE, ADC12MCTL_)
+#endif
+
 // define platform constants that can be changed for different compilers
 // these are all msp430-gcc specific (add as necessary)
 
@@ -134,6 +145,11 @@ to_type func_name(from_type x) { union {from_type f; to_type t;} c = {f:x}; retu
 #define __msp430_have_adc12
 #endif
 
+// backwards compatibility to older versions of the header files
+#ifdef __MSP430_HAS_I2C__
+#define __msp430_have_usart0_with_i2c
+#endif
+
 // I2CBusy flag is not defined by current MSP430-GCC
 #ifdef __msp430_have_usart0_with_i2c
 #ifndef I2CBUSY