wl_defs.h

00001 #ifndef WL_DEFS_H
00002 #define WL_DEFS_H
00003 
00004 //comment out this line if using a computer hooked up to an xbee
00005 //#define ROBOT
00006 
00007 //uncomment this line for debug information
00008 //#define WL_DEBUG
00009 
00010 // Packet Groups and Types
00011 
00012 // Error group
00013 #define WL_ERROR_GROUP 1
00014 
00015 #define WL_ERROR_STRING_TYPE 1
00016 
00017 // Token Ring group
00018 #define WL_TOKEN_RING_GROUP 2
00019 
00020 #define WL_TOKEN_PASS 1
00021 #define WL_TOKEN_BOM_ON 2
00022 #define WL_TOKEN_JOIN 3
00023 #define WL_TOKEN_JOIN_ACCEPT 4
00024 
00025 // timing constants
00026 #ifndef FIREFLY
00027 #define BOM_DELAY 100
00028 #else
00029 #define BOM_DELAY 100
00030 #endif
00031 
00032 #define DEATH_DELAY 4
00033 #define JOIN_DELAY 8
00034 
00035 // Recharging group
00036 #define WL_RECHARGE_GROUP 3
00037 
00038 #define WL_RECHARGE_POLL_STATIONS 1
00039 #define WL_RECHARGE_STATION_AVAILABLE 2
00040 #define WL_RECHARGE_REQUEST 3
00041 #define WL_RECHARGE_REQUEST_ACCEPT 4
00042 #define WL_RECHARGE_VERIFY 5
00043 #define WL_RECHARGE_CANCEL 6
00044 #define WL_RECHARGE_SEEKING 7
00045 #define WL_RECHARGE_DOCKED 8
00046 
00047 #ifdef WL_DEBUG
00048 
00049 #ifdef ROBOT
00050 #include <serial.h>
00051 #endif
00052 
00053 #ifdef ROBOT
00054 #define WL_DEBUG_PRINT( s ) usb_puts( s )
00055 #else
00056 #define WL_DEBUG_PRINT( s ) printf( s )
00057 #endif
00058 
00059 #ifdef ROBOT
00060 #define WL_DEBUG_PRINT_INT( i ) usb_puti(i)
00061 #else
00062 #define WL_DEBUG_PRINT_INT( i ) printf("%i", i)
00063 #endif
00064 
00065 #else
00066 
00067 #define WL_DEBUG_PRINT( s )
00068 #define WL_DEBUG_PRINT_INT( i )
00069 
00070 #endif
00071 
00072 #endif
00073 

Generated on Wed Oct 31 17:54:43 2007 for libwireless by  doxygen 1.4.6