Project

General

Profile

Statistics
| Revision:

root / branches / autonomous_recharging / code / projects / autonomous_recharging / dragonfly / main.c @ 138

History | View | Annotate | Download (481 Bytes)

1
#include <dragonfly_lib.h>
2
#include <wireless.h>
3
#include <wl_token_ring.h>
4

    
5
#include "recharge.h"
6

    
7
int main(void)
8
{
9
        dragonfly_init(ALL_ON);
10
        usb_puts("Initializing wireless.\n");
11
        wl_init();
12
        //orb_set_color(YELLOW);
13
        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
        return 0;
30
}
31