]> rtime.felk.cvut.cz Git - CanFestival-3.git/blobdiff - include/objdictdef.h
Changed OD size from UNS8 to UNS32, and repercuted change to PDO and SDO. Thanks...
[CanFestival-3.git] / include / objdictdef.h
index cce9360b6d5e0ecc41a2c3c51f8363d8c2a50788..60948b85a7526cc7cc6e6c665619c20e71e967f2 100644 (file)
@@ -75,6 +75,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 #define RO     0x02
 
 #define TO_BE_SAVE  0x04
+#define DCF_TO_SEND 0x08
 
 /************************ STRUCTURES ****************************/
 /** This are some structs which are neccessary for creating the entries
@@ -84,7 +85,7 @@ typedef struct td_subindex
 {
     UNS8                    bAccessType;
     UNS8                    bDataType; /* Defines of what datatype the entry is */
-    UNS                   size;      /* The size (in Byte) of the variable */
+    UNS32                   size;      /* The size (in Byte) of the variable */
     void*                   pObject;   /* This is the pointer of the Variable */
 } subindex;
 
@@ -117,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.w & 0x7f)
-#define GET_FUNCTION_CODE(m)     (m.cob_id.w >> 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__ */