Project

General

Profile

Statistics
| Revision:

root / trunk / code / projects / libwireless / lib / wl_defs.h @ 188

History | View | Annotate | Download (1.23 KB)

1 159 jknichel
#ifndef WL_DEFS_H
2
#define WL_DEFS_H
3
4 17 bcoltin
//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 178 bcoltin
//#define WL_DEBUG
9 17 bcoltin
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 188 bcoltin
#define WL_TOKEN_JOIN 3
23
#define WL_TOKEN_JOIN_ACCEPT 4
24 17 bcoltin
25
// timing constants
26 166 bcoltin
#ifndef FIREFLY
27 17 bcoltin
#define BOM_DELAY 100
28 166 bcoltin
#else
29
#define BOM_DELAY 200
30
#endif
31
32 138 bcoltin
#define DEATH_DELAY 4
33 17 bcoltin
#define JOIN_DELAY 8
34
35
// Recharging group
36
#define WL_RECHARGE_GROUP 3
37
38
#define WL_RECHARGE_POLL_STATIONS 1
39
#define WL_RECHARGE_STATION_AVAILABLE 2
40
#define WL_RECHARGE_REQUEST 3
41
#define WL_RECHARGE_REQUEST_ACCEPT 4
42
#define WL_RECHARGE_VERIFY 5
43
#define WL_RECHARGE_CANCEL 6
44
#define WL_RECHARGE_SEEKING 7
45
#define WL_RECHARGE_DOCKED 8
46
47
#ifdef WL_DEBUG
48
49
#ifdef ROBOT
50
#include <serial.h>
51
#endif
52
53
#ifdef ROBOT
54
#define WL_DEBUG_PRINT( s ) usb_puts( s )
55
#else
56
#define WL_DEBUG_PRINT( s ) printf( s )
57
#endif
58
59
#ifdef ROBOT
60
#define WL_DEBUG_PRINT_INT( i ) usb_puti(i)
61
#else
62
#define WL_DEBUG_PRINT_INT( i ) printf("%i", i)
63
#endif
64
65
#else
66
67
#define WL_DEBUG_PRINT( s )
68
#define WL_DEBUG_PRINT_INT( i )
69
70
#endif
71
72 159 jknichel
#endif