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