root / trunk / code / lib / include / libwireless / wl_defs.h @ 166
History | View | Annotate | Download (1.25 KB)
1 |
//comment out this line if using a computer hooked up to an xbee
|
---|---|
2 |
//#define ROBOT
|
3 |
|
4 |
//uncomment this line for debug information
|
5 |
//#define WL_DEBUG
|
6 |
|
7 |
// Packet Groups and Types
|
8 |
|
9 |
// Error group
|
10 |
#define WL_ERROR_GROUP 1 |
11 |
|
12 |
#define WL_ERROR_STRING_TYPE 1 |
13 |
|
14 |
// Token Ring group
|
15 |
#define WL_TOKEN_RING_GROUP 2 |
16 |
|
17 |
#define WL_TOKEN_PASS 1 |
18 |
#define WL_TOKEN_BOM_ON 2 |
19 |
#define WL_TOKEN_INTERRUPT_REQUEST 3 |
20 |
#define WL_TOKEN_INTERRUPT_PASS 4 |
21 |
#define WL_TOKEN_JOIN 5 |
22 |
#define WL_TOKEN_JOIN_ACCEPT 6 |
23 |
|
24 |
// timing constants
|
25 |
#ifndef FIREFLY
|
26 |
#define BOM_DELAY 100 |
27 |
#else
|
28 |
#define BOM_DELAY 200 |
29 |
#endif
|
30 |
|
31 |
#define DEATH_DELAY 4 |
32 |
#define JOIN_DELAY 8 |
33 |
|
34 |
// Recharging group
|
35 |
#define WL_RECHARGE_GROUP 3 |
36 |
|
37 |
#define WL_RECHARGE_POLL_STATIONS 1 |
38 |
#define WL_RECHARGE_STATION_AVAILABLE 2 |
39 |
#define WL_RECHARGE_REQUEST 3 |
40 |
#define WL_RECHARGE_REQUEST_ACCEPT 4 |
41 |
#define WL_RECHARGE_VERIFY 5 |
42 |
#define WL_RECHARGE_CANCEL 6 |
43 |
#define WL_RECHARGE_SEEKING 7 |
44 |
#define WL_RECHARGE_DOCKED 8 |
45 |
|
46 |
#ifdef WL_DEBUG
|
47 |
|
48 |
#ifdef ROBOT
|
49 |
#include <serial.h> |
50 |
#endif
|
51 |
|
52 |
#ifdef ROBOT
|
53 |
#define WL_DEBUG_PRINT( s ) usb_puts( s )
|
54 |
#else
|
55 |
#define WL_DEBUG_PRINT( s ) printf( s )
|
56 |
#endif
|
57 |
|
58 |
#ifdef ROBOT
|
59 |
#define WL_DEBUG_PRINT_INT( i ) usb_puti(i)
|
60 |
#else
|
61 |
#define WL_DEBUG_PRINT_INT( i ) printf("%i", i) |
62 |
#endif
|
63 |
|
64 |
#else
|
65 |
|
66 |
#define WL_DEBUG_PRINT( s )
|
67 |
#define WL_DEBUG_PRINT_INT( i )
|
68 |
|
69 |
#endif
|
70 |
|