/home/epimerde/documents/tc11/CanFestival-3/include/sysdep.h

Go to the documentation of this file.
00001 #ifndef __sysdep_h__
00002 #define __sysdep_h__
00003 
00004 #include "config.h"
00005 
00006 #ifdef CANOPEN_BIG_ENDIAN
00007 
00008 /* Warning: the argument must not update pointers, e.g. *p++ */
00009 
00010 #define UNS16_LE(v)  ((((UNS16)(v) & 0xff00) >> 8) | \
00011                       (((UNS16)(v) & 0x00ff) << 8))
00012 
00013 #define UNS32_LE(v)  ((((UNS32)(v) & 0xff000000) >> 24) |       \
00014                       (((UNS32)(v) & 0x00ff0000) >> 8)  |       \
00015                       (((UNS32)(v) & 0x0000ff00) << 8)  |       \
00016                       (((UNS32)(v) & 0x000000ff) << 24))
00017 
00018 #else
00019 
00020 #define UNS16_LE(v)  (v)
00021 
00022 #define UNS32_LE(v)  (v)
00023 
00024 #endif
00025 
00026 #endif /* __sysdep_h__ */
00027 

Generated on Mon Jun 4 16:29:06 2007 for CanFestival by  doxygen 1.5.1