]> rtime.felk.cvut.cz Git - CanFestival-3.git/commitdiff
Some more Endianess fixes.
authoretisserant <etisserant>
Fri, 25 Apr 2008 14:48:34 +0000 (14:48 +0000)
committeretisserant <etisserant>
Fri, 25 Apr 2008 14:48:34 +0000 (14:48 +0000)
include/objdictdef.h

index e76907fdfb8fb714bcb75b1e8b1e9e64611e7195..8361ee6d7697574a37716229e54ceeb6fde6e003 100644 (file)
@@ -118,7 +118,7 @@ typedef const indextable * (*scanIndexOD_t)(UNS16 wIndex, UNS32 * errorCode, ODC
 /************************** MACROS *********************************/
 
 /* CANopen usefull helpers */
-#define GET_NODE_ID(m)         (m.cob_id & 0x7f)
-#define GET_FUNCTION_CODE(m)     (m.cob_id >> 7)
+#define GET_NODE_ID(m)         (UNS16_LE(m.cob_id) & 0x7f)
+#define GET_FUNCTION_CODE(m)   (UNS16_LE(m.cob_id) >> 7)
 
 #endif /* __objdictdef_h__ */