00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00026 #ifndef __def_h__
00027 #define __def_h__
00028
00029 #include <string.h>
00030
00031
00034 #define BYTE unsigned char
00035
00037 #define WORD unsigned short // Microchip mcc18: 16bit
00038
00040 #define DWORD unsigned long // Microchip mcc18: 32bit
00041
00043 #define BIT bit
00044 #ifdef ARBRACAN
00045
00047 #define FAR
00048
00050 #define AUTO
00051
00053 #define RAM
00054
00056 #define XDATA
00057
00059 #define CODE // data that belongs to the ROM
00060 #endif
00061 #ifdef PIC_CAN
00062
00064 #define XDATA ram // data that are in RAM
00065
00067 #define FAR far
00068
00070 #define AUTO auto
00071
00073 #define RAM ram
00074
00076 #define CODE rom // data that belongs to the ROM
00077 #endif
00078 #define XHUGE // generic pointer
00079
00080
00086 #define NO_SUCH_INDEX 0x11
00087
00090 #define SUCCESSFUL 0x12
00091
00094 #define SUBINDEX_NOT_EXIST 0x13
00095
00096
00099 #define CONNECTION_OK 0x33
00100
00102 #define CONNECTION_FAILED 0x31
00103
00105 #define GUARDING_MESSAGE_LOST 0x32
00106
00108 #define HEARTBEAT_MESSAGE_LOST 0x34
00109
00111 #define HEARTBEAT_CONSUMER_LOST 0x35
00112
00113
00114
00117 #define NO_ERROR 0x0000
00118
00120 #define GENERIC_ERROR 0x1000
00121
00123 #define CURRENT_ERROR 0x2000
00124
00126 #define VOLTAGE_ERROR 0x3000
00127
00129 #define HARDWARE_ERROR 0x5000
00130
00131
00132 typedef enum _BOOL { FALSE = 0, TRUE } BOOL;
00133
00134 #endif // __def_h__