Revision a193bcf1 unittests/periphery-lld/src/ut_alld_DW1000_v1.c
unittests/periphery-lld/src/ut_alld_DW1000_v1.c | ||
---|---|---|
268 | 268 |
port_DisableEXT_IRQ(); |
269 | 269 |
|
270 | 270 |
setHighSpeed_SPI(false, (DW1000Driver*) ut->data); |
271 |
chprintf(stream, "expected device ID (LS SPI): 0xDECA0130 \n");
|
|
271 |
chprintf(stream, "expected device ID (LS SPI): 0xDECA0130\n"); |
|
272 | 272 |
aosThdMSleep(5); |
273 | 273 |
actual_deviceId = instancereaddeviceid(); |
274 | 274 |
chprintf(stream, "actual read ID: 0x%x\n", actual_deviceId); |
... | ... | |
286 | 286 |
if(DWT_DEVICE_ID != actual_deviceId){ |
287 | 287 |
chprintf(stream, "SPI is not working or Unsupported Device ID\n"); |
288 | 288 |
chprintf(stream, "actual device ID is: 0x%x\n", actual_deviceId); |
289 |
chprintf(stream, "expected device ID: 0xDECA0130 \n");
|
|
289 |
chprintf(stream, "expected device ID: 0xDECA0130\n"); |
|
290 | 290 |
aosThdMSleep(5); |
291 | 291 |
} |
292 | 292 |
|
... | ... | |
303 | 303 |
|
304 | 304 |
reset_DW1000(); |
305 | 305 |
|
306 |
chprintf(stream, "initialise instance for DW1000 \n");
|
|
306 |
chprintf(stream, "initialise instance for DW1000\n"); |
|
307 | 307 |
aosThdSleep(1); |
308 | 308 |
|
309 | 309 |
int x_init = instance_init((DW1000Driver*) ut->data) ; |
310 | 310 |
|
311 | 311 |
if (0 != x_init){ |
312 |
chprintf(stream, "init error with return value: %d \n", x_init);
|
|
312 |
chprintf(stream, "init error with return value: %d\n", x_init); |
|
313 | 313 |
aosThdSleep(1); |
314 | 314 |
} |
315 | 315 |
else { |
316 |
chprintf(stream, "init success with return value: %d \n", x_init);
|
|
316 |
chprintf(stream, "init success with return value: %d\n", x_init); |
|
317 | 317 |
aosThdSleep(1); |
318 | 318 |
} |
319 | 319 |
|
... | ... | |
341 | 341 |
port_EnableEXT_IRQ(); |
342 | 342 |
reset_DW1000(); |
343 | 343 |
|
344 |
chprintf(stream, "initialise the configuration for UWB application \n");
|
|
344 |
chprintf(stream, "initialise the configuration for UWB application\n"); |
|
345 | 345 |
aosThdSleep(1); |
346 | 346 |
|
347 | 347 |
int uwb_init = UWB_Init((DW1000Driver*) ut->data); |
348 | 348 |
|
349 | 349 |
if (0 != uwb_init){ |
350 |
chprintf(stream, "UWB config error with return value: %d \n", uwb_init);
|
|
350 |
chprintf(stream, "UWB config error with return value: %d\n", uwb_init); |
|
351 | 351 |
aosThdSleep(1); |
352 | 352 |
} |
353 | 353 |
else { |
354 |
chprintf(stream, "UWB config success with return value: %d \n", uwb_init);
|
|
354 |
chprintf(stream, "UWB config success with return value: %d\n", uwb_init); |
|
355 | 355 |
aosThdSleep(1); |
356 | 356 |
} |
357 | 357 |
|
... | ... | |
372 | 372 |
|
373 | 373 |
/*! RUN THE STATE MACHINE DEMO APP (RTLS) */ |
374 | 374 |
|
375 |
chprintf(stream, "initialise the State Machine \n");
|
|
375 |
chprintf(stream, "initialise the State Machine\n"); |
|
376 | 376 |
aosThdSleep(2); |
377 | 377 |
|
378 | 378 |
/* Initialize UWB system with user defined configuration */ |
379 | 379 |
int uwb_init = UWB_Init((DW1000Driver*) ut->data); |
380 | 380 |
|
381 | 381 |
if (0 != uwb_init){ |
382 |
chprintf(stream, "error in UWB config with return value: %d \n", uwb_init);
|
|
382 |
chprintf(stream, "error in UWB config with return value: %d\n", uwb_init); |
|
383 | 383 |
} |
384 | 384 |
else { |
385 |
chprintf(stream, "succeed the init of UWB config \n");
|
|
385 |
chprintf(stream, "succeed the init of UWB config\n"); |
|
386 | 386 |
} |
387 | 387 |
aosThdSleep(1); |
388 | 388 |
|
389 |
chprintf(stream, "running the RTLS demo application ... \n");
|
|
389 |
chprintf(stream, "running the RTLS demo application ...\n"); |
|
390 | 390 |
aosThdSleep(1); |
391 | 391 |
|
392 | 392 |
/*! Run the localization system demo app as a thread */ |
Also available in: Unified diff