]> rtime.felk.cvut.cz Git - lincan.git/blobdiff - lincan/include/canmsg.h
Merge branch 'master' into can-usb1
[lincan.git] / lincan / include / canmsg.h
index 4c75efe74c2b7781234061a0e87fcba5bcbe5be3..0738fc9bdc4adbfcc1ecbf999529500c6c7d8b6b 100644 (file)
@@ -16,6 +16,7 @@
 
 #else /* __KERNEL__ */
 
+#include <inttypes.h>
 #include <sys/time.h>
 #include <sys/types.h>
 
@@ -39,6 +40,8 @@ extern "C" {
 
 typedef struct timeval canmsg_tstamp_t ;
 
+typedef unsigned long canmsg_id_t;
+
 /**
  * struct canmsg_t - structure representing CAN message
  * @flags:  message flags
@@ -57,7 +60,7 @@ typedef struct timeval canmsg_tstamp_t ;
 struct canmsg_t {
        int             flags;
        int             cob;
-       unsigned long   id;
+       canmsg_id_t     id;
        canmsg_tstamp_t timestamp;
        unsigned short  length;
        unsigned char   data[CAN_MSG_LENGTH];
@@ -71,7 +74,7 @@ struct canmsg_t {
 struct canmsg_t {
        short           flags;
        int             cob;
-       unsigned long   id;
+       canmsg_id_t     id;
        unsigned long   timestamp;
        unsigned int    length;
        unsigned char   data[CAN_MSG_LENGTH];
@@ -104,8 +107,8 @@ struct canfilt_t {
        int             flags;
        int             queid;
        int             cob;
-       unsigned long   id;
-       unsigned long   mask;
+       canmsg_id_t     id;
+       canmsg_id_t     mask;
 };
 
 typedef struct canfilt_t canfilt_t;