From: vlahan Date: Mon, 23 Jun 2008 18:35:36 +0000 (+0000) Subject: Redefinitions for safe tinyos. With this patch, it so no longer necessary to modify... X-Git-Tag: release_tinyos_2_1_0_0~209 X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=commitdiff_plain;h=a41b98d181ded46aa341ba63987b597da5da5c50;p=tinyos-2.x.git Redefinitions for safe tinyos. With this patch, it so no longer necessary to modify the msp430 toolchain. All changes are contained in the tinyos source. Similar modification needs to be applied to atm128hardware.h for the Atmel platforms --- diff --git a/tos/chips/msp430/msp430hardware.h b/tos/chips/msp430/msp430hardware.h index dd4a4696..c7a96d04 100644 --- a/tos/chips/msp430/msp430hardware.h +++ b/tos/chips/msp430/msp430hardware.h @@ -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)