wl_defs.h

Go to the documentation of this file.
00001 
00036 #ifndef WL_DEFS_H
00037 #define WL_DEFS_H
00038 
00039 //comment out this line if using a computer hooked up to an xbee
00040 //#define ROBOT
00041 
00042 //uncomment this line for debug information
00043 //#define WL_DEBUG
00044 
00045 // Packet Groups and Types
00046 
00047 // Error group
00048 #define WL_ERROR_GROUP 1
00049 
00050 #define WL_ERROR_STRING_TYPE 1
00051 
00052 // Token Ring group
00053 #define WL_TOKEN_RING_GROUP 2
00054 
00055 #define WL_TOKEN_PASS 1
00056 #define WL_TOKEN_SENSOR_MATRIX 2
00057 #define WL_TOKEN_BOM_ON 3
00058 #define WL_TOKEN_JOIN 4
00059 #define WL_TOKEN_JOIN_ACCEPT 5
00060 
00061 // timing constants
00062 #ifndef FIREFLY
00063 #define BOM_DELAY 100
00064 #else
00065 #define BOM_DELAY 200
00066 #endif
00067 
00068 #define DEATH_DELAY 4
00069 #define JOIN_DELAY 8
00070 
00071 #ifdef WL_DEBUG
00072 
00073 #ifdef ROBOT
00074 #include <serial.h>
00075 #endif
00076 
00077 #ifdef ROBOT
00078 #define WL_DEBUG_PRINT( s ) usb_puts( s )
00079 #else
00080 #define WL_DEBUG_PRINT( s ) printf( s )
00081 #endif
00082 
00083 #ifdef ROBOT
00084 #define WL_DEBUG_PRINT_INT( i ) usb_puti(i)
00085 #else
00086 #define WL_DEBUG_PRINT_INT( i ) printf("%i", i)
00087 #endif
00088 
00089 #else
00090 
00091 #define WL_DEBUG_PRINT( s )
00092 #define WL_DEBUG_PRINT_INT( i )
00093 
00094 #endif
00095 
00096 #endif
00097 

Generated on Mon Apr 28 17:49:53 2008 for libwireless by  doxygen 1.5.3