Revision 1754
Wireless: updated wireless_test2.c for continued testing progress.
test_wireless2.c | ||
---|---|---|
207 | 207 |
uint16_t address = 0; |
208 | 208 |
sendBuffer[0] = (data& 0xFF00) >> 8; |
209 | 209 |
sendBuffer[1] = (data& 0x00FF); |
210 |
wl_send((uint8_t*)&sendBuffer, 2, 0, GLOBAL, BROADCAST, FAST); |
|
211 |
while (wl_get_basic(sendBuffer,2) <= 0) { |
|
212 |
WL_DEBUG_PRINT_P("error receiving data"); |
|
213 |
} |
|
214 |
address = sendBuffer[0]<<8+sendBuffer[1]; |
|
215 |
WL_DEBUG_PRINT_P("Friend address="); |
|
216 |
usb_puth16(address); |
|
217 |
|
|
210 |
|
|
218 | 211 |
|
219 | 212 |
WL_DEBUG_PRINT_P("\r\n\r\nXBee tests completed. There were "); |
220 | 213 |
usb_puti(status); |
... | ... | |
336 | 329 |
usb_puti(xbee_get_address()); |
337 | 330 |
sendBuffer[0] = (data& 0xFF00) >> 8; |
338 | 331 |
sendBuffer[1] = (data& 0x00FF); |
339 |
wl_send((uint8_t*)&sendBuffer, 2, 0, GLOBAL, BROADCAST, FAST);
|
|
332 |
wl_send((uint8_t*)sendBuffer, 2, 0, GLOBAL, BROADCAST, FAST); |
|
340 | 333 |
delay_ms(1000); |
341 | 334 |
len = wl_get_basic(buffer, 10); |
342 | 335 |
if(len != 0){ |
Also available in: Unified diff