Dependents:   Kamal_CAN ReadFromSerial446

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers mcp2515_can.h Source File

mcp2515_can.h

00001 #ifndef MCP2515_CAN_H_
00002 #define MCP2515_CAN_H_
00003 
00004 #define CANDEBUG   1
00005 
00006 #define CANUSELOOP 0
00007 
00008 #define CANSENDTIMEOUT (200) /* milliseconds */
00009 
00010 // initial value of gCANAutoProcess
00011 #define CANAUTOPROCESS (1)
00012 #define CANAUTOON  (1)
00013 #define CANAUTOOFF (0)
00014 
00015 #define CAN_STDID (0)
00016 #define CAN_EXTID (1)
00017 
00018 #define CANDEFAULTIDENT    (0x55CC)
00019 #define CANDEFAULTIDENTEXT (CAN_EXTID)
00020 
00021 #define CAN_20KBPS   (1)
00022 #define CAN_125KBPS  (CAN_20KBPS+1)
00023 
00024 #define CAN_1MBPS_8MHZ (58)
00025 #define CAN_500KBPS_8MHZ (57)
00026 #define CAN_250KBPS_8MHZ (56)
00027 #define CAN_125KBPS_8MHZ (55)
00028 #define CAN_100KBPS_8MHZ (54)
00029 #define CAN_50KBPS_8MHZ (53)
00030 #define CAN_20KBPS_8MHZ (52)
00031 #define CAN_10KBPS_8MHZ (51)
00032 
00033 #define CAN_OK         (0)
00034 #define CAN_FAILINIT   (1)
00035 #define CAN_FAILTX     (2)
00036 #define CAN_MSGAVAIL   (3)
00037 #define CAN_NOMSG      (4)
00038 #define CAN_CTRLERROR  (5)
00039 #define CAN_FAIL       (0xff)
00040 
00041 #define CAN_MAX_CHAR_IN_MESSAGE (8)
00042 
00043 
00044 #endif