root / branches / autonomous_recharging / code / projects / autonomous_recharging / dragonfly / main.c @ 138
History | View | Annotate | Download (481 Bytes)
1 | 105 | bcoltin | #include <dragonfly_lib.h> |
---|---|---|---|
2 | 116 | bcoltin | #include <wireless.h> |
3 | #include <wl_token_ring.h> |
||
4 | 105 | bcoltin | |
5 | 116 | bcoltin | #include "recharge.h" |
6 | |||
7 | 105 | bcoltin | int main(void) |
8 | { |
||
9 | 138 | bcoltin | dragonfly_init(ALL_ON); |
10 | 116 | bcoltin | usb_puts("Initializing wireless.\n");
|
11 | wl_init(); |
||
12 | 137 | bcoltin | //orb_set_color(YELLOW);
|
13 | 116 | bcoltin | wl_token_ring_register(); |
14 | wl_token_ring_join(); |
||
15 | usb_puts("Wireless initialized.\n");
|
||
16 | recharge_init(); |
||
17 | usb_puts("Recharging initialized.\n");
|
||
18 | |||
19 | while (1) |
||
20 | { |
||
21 | wl_do(); |
||
22 | int charging = recharge_do();
|
||
23 | if (!charging)
|
||
24 | { |
||
25 | //do stuff
|
||
26 | } |
||
27 | } |
||
28 | |||
29 | 105 | bcoltin | return 0; |
30 | } |