Project

General

Profile

Revision 793

Updated bay board wireless library... Doesn't work at all.

View differences:

main.c
1 1
#include <bayboard_lib.h>
2 2
#include <wireless.h>
3 3
#include <wl_token_ring.h>
4
#include <xbee.h>
5
#include <ctype.h>
6 4

  
7
void test_bom_on (void)
5
int main(int argc, char** argv)
8 6
{
9
	set_orb(0,200,0);
10
	delay_ms(50);
11
}
12

  
13
void test_bom_off(void)
14
{
15
	set_orb(200,0,200);
16
	delay_ms(50);
17
}
18

  
19
int test_nothing(void)
20
{
21
	return -1;
22
}
23

  
24
void do_nothing (void) {
25
	
26
}
27

  
28
int main(void)
29
{
30 7
	bayboard_init(ALL_ON);
31
	//xbee_lib_init();
32
	
33
	set_orb(200,0,0);
34
	
8
	usb_puts("Start.\n");
9
	set_orb(0, 0, 200);
35 10
	wl_init();
36
	if(wl_token_ring_register() < 0) {
37
	  set_orb(200,0,0);
38
	  return -1;
39
	}
40
	if(wl_token_ring_join() < 0) {
41
	  set_orb(200,0,0);
42
	  return -1;
43
	}
44
	
45
	set_orb(0,200,0);
46
	usb_puts("== start ==\n");
47
	delay_ms(200);
48
	
49
	//bom_init(0);
50

  
51
  //int c;
52
  //char buf[20];
53
	while (1) {
54
	  wl_do();
55
	}
56
	
11
	set_orb(0, 200, 0);
12
	/*if (wl_token_ring_register() < 0)
13
		usb_puts("Failed to register token ring.\n");
14
	if (wl_token_ring_join() < 0)
15
		usb_puts("Failed to join token ring.\n");*/
16
	usb_puts("Wireless initialized.\n");
17
	//while (1)
18
	//	wl_do();
57 19
	return 0;
58
	
59 20
}
60 21

  
61

  

Also available in: Unified diff