Project

General

Profile

Statistics
| Revision:

root / trunk / code / lib / include / libwireless / wl_defs.h @ 138

History | View | Annotate | Download (1.2 KB)

1 18 bcoltin
//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 138 bcoltin
//#define WL_DEBUG
6 18 bcoltin
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
#define BOM_DELAY 100
26 138 bcoltin
#define DEATH_DELAY 4
27 18 bcoltin
#define JOIN_DELAY 8
28
29
// Recharging group
30
#define WL_RECHARGE_GROUP 3
31
32
#define WL_RECHARGE_POLL_STATIONS 1
33
#define WL_RECHARGE_STATION_AVAILABLE 2
34
#define WL_RECHARGE_REQUEST 3
35
#define WL_RECHARGE_REQUEST_ACCEPT 4
36
#define WL_RECHARGE_VERIFY 5
37
#define WL_RECHARGE_CANCEL 6
38
#define WL_RECHARGE_SEEKING 7
39
#define WL_RECHARGE_DOCKED 8
40
41
#ifdef WL_DEBUG
42
43
#ifdef ROBOT
44
#include <serial.h>
45
#endif
46
47
#ifdef ROBOT
48
#define WL_DEBUG_PRINT( s ) usb_puts( s )
49
#else
50
#define WL_DEBUG_PRINT( s ) printf( s )
51
#endif
52
53
#ifdef ROBOT
54
#define WL_DEBUG_PRINT_INT( i ) usb_puti(i)
55
#else
56
#define WL_DEBUG_PRINT_INT( i ) printf("%i", i)
57
#endif
58
59
#else
60
61
#define WL_DEBUG_PRINT( s )
62
#define WL_DEBUG_PRINT_INT( i )
63
64
#endif