nico@207: nico@207: nico@207: CanFestival: /home/epimerde/documents/tc11/CanFestival-3/drivers/can_lincan/lincan.h Source File nico@207: nico@207: nico@207: nico@207: nico@207:
nico@207:
nico@207:
nico@207:
nico@207:

/home/epimerde/documents/tc11/CanFestival-3/drivers/can_lincan/lincan.h

Go to the documentation of this file.
00001 /* can.h
nico@207: 00002  * Header file for the Linux CAN-bus driver.
nico@207: 00003  * Written by Arnaud Westenberg email:arnaud@wanadoo.nl
nico@207: 00004  * Rewritten for new CAN queues by Pavel Pisa - OCERA team member
nico@207: 00005  * email:pisa@cmp.felk.cvut.cz
nico@207: 00006  * This software is released under the GPL-License.
nico@207: 00007  * Version lincan-0.3  17 Jun 2004
nico@207: 00008  */
nico@207: 00009 
nico@207: 00010 #ifndef _CAN_DRVAPI_T_H
nico@207: 00011 #define _CAN_DRVAPI_T_H
nico@207: 00012 
nico@207: 00013 #ifdef __KERNEL__
nico@207: 00014 
nico@207: 00015 #include <linux/time.h>
nico@207: 00016 #include <linux/types.h>
nico@207: 00017 #include <linux/ioctl.h>
nico@207: 00018 
nico@207: 00019 #else /* __KERNEL__ */
nico@207: 00020 
nico@207: 00021 #include <sys/time.h>
nico@207: 00022 #include <sys/types.h>
nico@207: 00023 #include <sys/ioctl.h>
nico@207: 00024 
nico@207: 00025 #endif /* __KERNEL__ */
nico@207: 00026 
nico@207: 00027 #include "./canmsg.h"
nico@207: 00028 
nico@207: 00029 #ifdef __cplusplus
nico@207: 00030 extern "C" {
nico@207: 00031 #endif
nico@207: 00032 
nico@207: 00033 /* CAN ioctl magic number */
nico@207: 00034 #define CAN_IOC_MAGIC 'd'
nico@207: 00035 
nico@207: 00036 typedef unsigned long bittiming_t;
nico@207: 00037 typedef unsigned short channel_t;
nico@207: 00038 
nico@207: 00049 struct can_baudparams_t {
nico@207: 00050         long flags;
nico@207: 00051         long baudrate;
nico@207: 00052         long sjw;
nico@207: 00053         long sample_pt;
nico@207: 00054 };
nico@207: 00055 
nico@207: 00056 /* CAN ioctl functions */
nico@207: 00057 #define CAN_DRV_QUERY _IO(CAN_IOC_MAGIC, 0)
nico@207: 00058 #define CAN_DRV_QRY_BRANCH    0 /* returns driver branch value - "LINC" for LinCAN driver */
nico@207: 00059 #define CAN_DRV_QRY_VERSION   1 /* returns driver version as (major<<16) | (minor<<8) | patch */
nico@207: 00060 #define CAN_DRV_QRY_MSGFORMAT 2 /* format of canmsg_t structure */
nico@207: 00061 
nico@207: 00062 #define CMD_START _IOW(CAN_IOC_MAGIC, 1, channel_t)
nico@207: 00063 #define CMD_STOP _IOW(CAN_IOC_MAGIC, 2, channel_t)
nico@207: 00064 //#define CMD_RESET 3
nico@207: 00065 
nico@207: 00066 #define CONF_BAUD _IOW(CAN_IOC_MAGIC, 4, bittiming_t)
nico@207: 00067 //#define CONF_ACCM
nico@207: 00068 //#define CONF_XTDACCM
nico@207: 00069 //#define CONF_TIMING
nico@207: 00070 //#define CONF_OMODE
nico@207: 00071 #define CONF_FILTER _IOW(CAN_IOC_MAGIC, 8, unsigned char)
nico@207: 00072 
nico@207: 00073 //#define CONF_FENABLE
nico@207: 00074 //#define CONF_FDISABLE
nico@207: 00075 
nico@207: 00076 #define STAT _IO(CAN_IOC_MAGIC, 9)
nico@207: 00077 #define CANQUE_FILTER _IOW(CAN_IOC_MAGIC, 10, struct canfilt_t)
nico@207: 00078 #define CANQUE_FLUSH  _IO(CAN_IOC_MAGIC, 11)
nico@207: 00079 #define CONF_BAUDPARAMS  _IOW(CAN_IOC_MAGIC, 11, struct can_baudparams_t)
nico@207: 00080 #define CANRTR_READ  _IOWR(CAN_IOC_MAGIC, 12, struct canmsg_t)
nico@207: 00081 
nico@207: 00082 #ifdef __cplusplus
nico@207: 00083 } /* extern "C"*/
nico@207: 00084 #endif
nico@207: 00085 
nico@207: 00086 #endif /*_CAN_DRVAPI_T_H*/
nico@207: 

Generated on Mon Jun 4 16:29:06 2007 for CanFestival by  nico@207: nico@207: doxygen 1.5.1
nico@207: nico@207: