]> rtime.felk.cvut.cz Git - lincan.git/blobdiff - lincan/include/can.h
The first enhanced version of Linux CAN-bus driver for OCERA project
[lincan.git] / lincan / include / can.h
index 071deae0a4681c918862efef10591bd77532f2bb..6ccb6dcf63bd1d7ef87ad6beebb31653cb882e68 100644 (file)
@@ -13,7 +13,7 @@ struct canmsg_t {
        unsigned long   id;
        unsigned long   timestamp;
        unsigned int    length;
-       char            data[CAN_MSG_LENGTH];
+       unsigned char   data[CAN_MSG_LENGTH];
 } PACKED;
 
 /* Definitions to use for canmsg_t flags */
@@ -24,15 +24,15 @@ struct canmsg_t {
 /* CAN ioctl magic number */
 #define CAN_IOC_MAGIC 'd'
 
-unsigned long bittiming;
-unsigned short channel;
+typedef unsigned long bittiming_t;
+typedef unsigned short channel_t;
 
 /* CAN ioctl functions */
-#define CMD_START _IOW(CAN_IOC_MAGIC, 1, channel)
-#define CMD_STOP _IOW(CAN_IOC_MAGIC, 2, channel)
+#define CMD_START _IOW(CAN_IOC_MAGIC, 1, channel_t)
+#define CMD_STOP _IOW(CAN_IOC_MAGIC, 2, channel_t)
 //#define CMD_RESET 3
 
-#define CONF_BAUD _IOW(CAN_IOC_MAGIC, 4, bittiming)
+#define CONF_BAUD _IOW(CAN_IOC_MAGIC, 4, bittiming_t)
 //#define CONF_ACCM
 //#define CONF_XTDACCM
 //#define CONF_TIMING