00001 /*CAN.h 00002 7/24/03 00003 00004 Nathan Z. Gustavson 00005 ngustavson@emacinc.com 00006 Emac.inc 00007 www.emacinc.com 00008 struct types and definitions for pcde12 CAN programming 00009 */ 00010 00011 #ifndef CANH 00012 #define CANH 00013 00014 #include <sys/types.h> 00015 #include <asm/types.h> 00016 00017 #define CAN_MSG_LENGTH 8 00018 00019 typedef struct E12Can_Message{ 00020 // flags, indicating or controlling special message properties 00021 __u8 flags; 00022 __u16 id; //< ID number 00023 __u8 length; //< number of bytes in the CAN message 00024 __u8 data[CAN_MSG_LENGTH]; //< data, 0...8 bytes 00025 } E12Can_Message; 00026 00027 00028 00029 typedef void (*CANHandler)(E12Can_Message *,void *); 00030 00031 #endif