X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=tos%2Fchips%2Fatm128%2Fsim%2Fatm128hardware.h;h=a959ceb57f3c23b81e68cde7748b9602a7d2cbd7;hb=be8a40060769bc7fb6061b291701ce00822de035;hp=1b621beff921dc33d74292ff77ca46c067a5b768;hpb=1ba974b83d19fc41bf80acd52726f36f7f1df297;p=tinyos-2.x.git diff --git a/tos/chips/atm128/sim/atm128hardware.h b/tos/chips/atm128/sim/atm128hardware.h index 1b621bef..a959ceb5 100644 --- a/tos/chips/atm128/sim/atm128hardware.h +++ b/tos/chips/atm128/sim/atm128hardware.h @@ -55,8 +55,8 @@ uint8_t atm128RegFile[TOSSIM_MAX_NODES][0xa0]; /* Macro to create union casting functions. */ #define DEFINE_UNION_CAST(func_name, from_type, to_type) \ - to_type func_name(from_type x) { \ - union {from_type f; to_type t;} c = {f:x}; return c.t; } + to_type func_name(from_type x_type) { \ + union {from_type f_type; to_type t_type;} c_type = {f_type:x_type}; return c_type.t_type; } // Bit operators using bit number #define SET_BIT(port, bit) ((REG_ACCESS(port)) |= _BV(bit))