Can_open_slavenode

Dependencies:   mbed

Committer:
sam_grove
Date:
Mon May 30 07:14:41 2011 +0000
Revision:
0:6219434a0cb5
Initial public release of slave node framework port

Who changed what in which revision?

UserRevisionLine numberNew contents of line
sam_grove 0:6219434a0cb5 1 #ifndef __sysdep_h__
sam_grove 0:6219434a0cb5 2 #define __sysdep_h__
sam_grove 0:6219434a0cb5 3
sam_grove 0:6219434a0cb5 4 #include "config.h"
sam_grove 0:6219434a0cb5 5
sam_grove 0:6219434a0cb5 6 #ifdef CANOPEN_BIG_ENDIAN
sam_grove 0:6219434a0cb5 7
sam_grove 0:6219434a0cb5 8 /* Warning: the argument must not update pointers, e.g. *p++ */
sam_grove 0:6219434a0cb5 9
sam_grove 0:6219434a0cb5 10 #define UNS16_LE(v) ((((UNS16)(v) & 0xff00) >> 8) | \
sam_grove 0:6219434a0cb5 11 (((UNS16)(v) & 0x00ff) << 8))
sam_grove 0:6219434a0cb5 12
sam_grove 0:6219434a0cb5 13 #define UNS32_LE(v) ((((UNS32)(v) & 0xff000000) >> 24) | \
sam_grove 0:6219434a0cb5 14 (((UNS32)(v) & 0x00ff0000) >> 8) | \
sam_grove 0:6219434a0cb5 15 (((UNS32)(v) & 0x0000ff00) << 8) | \
sam_grove 0:6219434a0cb5 16 (((UNS32)(v) & 0x000000ff) << 24))
sam_grove 0:6219434a0cb5 17
sam_grove 0:6219434a0cb5 18 #else
sam_grove 0:6219434a0cb5 19
sam_grove 0:6219434a0cb5 20 #define UNS16_LE(v) (v)
sam_grove 0:6219434a0cb5 21
sam_grove 0:6219434a0cb5 22 #define UNS32_LE(v) (v)
sam_grove 0:6219434a0cb5 23
sam_grove 0:6219434a0cb5 24 #endif
sam_grove 0:6219434a0cb5 25
sam_grove 0:6219434a0cb5 26 #endif /* __sysdep_h__ */
sam_grove 0:6219434a0cb5 27