Project

General

Profile

Revision 1427

Added by Chris Mar over 14 years ago

updated wl_basic code, docs, and test. it's ready to go.

View differences:

test_wireless.c
19 19
#include <wl_basic.h>
20 20

  
21 21
unsigned char* packet;
22
int length;
22 23

  
23 24
int testwireless(void) {
24 25
    int count = 0;
......
58 59
        wl_basic_send_global_packet(1, "b", 2);
59 60
        usb_puts("sent BLUE packet\r\n");
60 61
        while(count < 2) {
61
            packet = wl_basic_do_default();
62
            packet = wl_basic_do_default(&length);
62 63
            if (packet != 0) {
63
                if (current_packet.length > 0) {
64
                if (length > 0) {
64 65
                    if (packet[0] == 'r') {
65 66
                        orb_set_color(RED);
66 67
                        usb_puts("received RED packet\r\n");
......
77 78
    }
78 79
    else {
79 80
        while(count < 2) {
80
            packet = wl_basic_do_default();
81
            packet = wl_basic_do_default(&length);
81 82
            if (packet != 0) {
82
                if (current_packet.length > 0) {
83
                if (length > 0) {
83 84
                    if (packet[0] == 'r') {
84 85
                        orb_set_color(RED);
85 86
                        usb_puts("received RED packet\r\n");

Also available in: Unified diff