Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

def.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           def.h  -  description
00003                              -------------------
00004     begin                : Fri May 17 2002
00005     copyright            : (C) 2002 by Raphael Zulliger
00006     email                : zulli@hsr.ch
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This library is Copyright (c) Raphael Zulliger <zulli@gmx.net>.       *
00012  *   It is licensed under the GNU Library General Public License (LGPL).   *
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 // predefined error-codes. neccessary for sending an emergency-message
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 // ... (the user can define more errors here)
00131 
00132 typedef enum _BOOL { FALSE = 0, TRUE } BOOL;
00133 
00134 #endif // __def_h__

Generated on Wed Dec 25 01:04:57 2002 for CANopen SlaveLib by doxygen1.2.17