Project

General

Profile

Revision 1755

wireless: update of wireless test

View differences:

branches/wireless/code/projects/unit_tests/test_wireless2.c
216 216
	/*Tests sending in fast mode*/
217 217
	WL_DEBUG_PRINT_P("\r\nTests sending basic packets in fast mode...\r\n");
218 218
	status = 0;
219
	data = xbee_get_address();
220
	status = wl_send((uint8_t*)&data, 2, 0, GLOBAL, BROADCAST, FAST);
219
	status = wl_send(sendBuffer, 2, 0, GLOBAL, BROADCAST, FAST);
221 220
	WL_DEBUG_PRINT_P("Global fast broadcast basic send exit code ");
222 221
	usb_puti(status);
223 222
  char bigbuf[10];
......
228 227
    WL_DEBUG_PRINT_P("\r\n");
229 228
  } else {
230 229
    WL_DEBUG_PRINT_P("get returned:");
231
    usb_puth16((uint16_t)bigbuf);
230
    usb_puth16(bigbuf);
232 231
  }
233
	status = wl_send((uint8_t*)&data, 2, 0, GLOBAL, PAN, FAST);
232
	status = wl_send(sendBuffer, 2, 0, GLOBAL, PAN, FAST);
234 233
	WL_DEBUG_PRINT_P("\r\nGlobal fast pan send basic exit code ");
235 234
	usb_puti(status);
236 235
  ret = wl_get(bigbuf,10);
......
240 239
    WL_DEBUG_PRINT_P("\r\n");
241 240
  } else {
242 241
    WL_DEBUG_PRINT_P("get returned:");
243
    usb_puth16((uint16_t)bigbuf);
242
    usb_puth16(bigbuf);
244 243
  }
245
	status = wl_send((uint8_t*)&data, 2, 0, GLOBAL, BROADCAST, FAST);
244
	status = wl_send(sendBuffer, 2, 0, GLOBAL, BROADCAST, FAST);
246 245
	WL_DEBUG_PRINT_P("\r\nGlobal fast broadcast basic send exit code ");
247 246
	usb_puti(status);
248 247
  ret = wl_get(bigbuf,10);
......
252 251
    WL_DEBUG_PRINT_P("\r\n");
253 252
  } else {
254 253
    WL_DEBUG_PRINT_P("get returned:");
255
    usb_puth16((uint16_t)bigbuf);
254
    usb_puth16(bigbuf);
256 255
  }
257
	status = wl_send((uint8_t*)&data, 2, 0, GLOBAL, PAN, FAST);
256
	status = wl_send(sendBuffer, 2, 0, GLOBAL, PAN, FAST);
258 257
	WL_DEBUG_PRINT_P("\r\nGlobal fast pan send basic exit code ");
259 258
	usb_puti(status);
260 259
  ret = wl_get(bigbuf,10);
......
264 263
    WL_DEBUG_PRINT_P("\r\n");
265 264
  } else {
266 265
    WL_DEBUG_PRINT_P("get returned:");
267
    usb_puth16((uint16_t)bigbuf);
266
    usb_puth16(bigbuf);
268 267
  }
269
	status = wl_send((uint8_t*)&data, 2, 1, GLOBAL, BROADCAST, FAST);
268
	status = wl_send(sendBuffer, 2, 1, GLOBAL, BROADCAST, FAST);
270 269
	WL_DEBUG_PRINT_P("\r\nGlobal fast broadcast group 1 send exit code ");
271 270
	usb_puti(status);
272 271
  ret = wl_get(bigbuf,10);
......
276 275
    WL_DEBUG_PRINT_P("\r\n");
277 276
  } else {
278 277
    WL_DEBUG_PRINT_P("get returned:");
279
    usb_puth16((uint16_t)bigbuf);
278
    usb_puth16(bigbuf);
280 279
  }
281
	status = wl_send((uint8_t*)&data, 2, 2, GLOBAL, PAN, FAST);
280
	status = wl_send(sendBuffer, 2, 2, GLOBAL, PAN, FAST);
282 281
	WL_DEBUG_PRINT_P("\r\nGlobal fast pan send group 2 exit code ");
283 282
	usb_puti(status);
284 283
  ret = wl_get(bigbuf,10);
......
288 287
    WL_DEBUG_PRINT_P("\r\n");
289 288
  } else {
290 289
    WL_DEBUG_PRINT_P("get returned:");
291
    usb_puth16((uint16_t)bigbuf);
290
    usb_puth16(bigbuf);
292 291
  }
293
	status = wl_send((uint8_t*)&data, 2, 1, GLOBAL, BROADCAST, FAST);
292
	status = wl_send(sendBuffer, 2, 1, GLOBAL, BROADCAST, FAST);
294 293
	WL_DEBUG_PRINT_P("\r\nGlobal fast broadcast group 3 send exit code ");
295 294
	usb_puti(status);
296 295
  ret = wl_get(bigbuf,10);
......
300 299
    WL_DEBUG_PRINT_P("\r\n");
301 300
  } else {
302 301
    WL_DEBUG_PRINT_P("get returned:");
303
    usb_puth16((uint16_t)bigbuf);
302
    usb_puth16(bigbuf);
304 303
  }
305
	status = wl_send((uint8_t*)&data, 2, 2, GLOBAL, PAN, FAST);
304
	status = wl_send(sendBuffer, 2, 2, GLOBAL, PAN, FAST);
306 305
	WL_DEBUG_PRINT_P("\r\nGlobal fast pan send group 4 exit code ");
307 306
	usb_puti(status);
308 307
  ret = wl_get(bigbuf,10);
......
312 311
    WL_DEBUG_PRINT_P("\r\n");
313 312
  } else {
314 313
    WL_DEBUG_PRINT_P("get returned:");
315
    usb_puth16((uint16_t)bigbuf);
314
    usb_puth16(bigbuf);
316 315
  }
317 316
	WL_DEBUG_PRINT_P("\r\nFast send tests successful\r\n");
318 317

  

Also available in: Unified diff