mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2024-11-22 14:10:37 +02:00
tools/lib/cwtest.c (cw_test_end): use reset also on USB devices
ATUSB can't use sleep mode because that would cut the AVR's clock. The old SiLabs-based boards would not have that issue, but there, the SLP_TR method is unproven. Besides, reset is as fast on USB.
This commit is contained in:
parent
52657edf38
commit
2a4f7a155f
@ -142,18 +142,13 @@ void cw_test_end(struct atrf_dsc *dsc)
|
||||
* AT86RF231 also exits test mode if we send it to sleep for a
|
||||
* moment.
|
||||
*/
|
||||
switch (atrf_identify(dsc)) {
|
||||
case artf_at86rf230:
|
||||
if (atrf_identify(dsc) == artf_at86rf230 || atrf_usb_handle(dsc))
|
||||
atrf_reset_rf(dsc);
|
||||
break;
|
||||
case artf_at86rf231:
|
||||
else {
|
||||
usleep(2); /* table 7-1: tTR12(typ) = 1 us */
|
||||
atrf_slp_tr(dsc, 1, 0);
|
||||
usleep(10); /* table 7-1: tTR3(typ) doesn't really apply */
|
||||
atrf_slp_tr(dsc, 0, 0);
|
||||
usleep(500); /* table 7-1: tTR2(typ) = 380 */
|
||||
break;
|
||||
default:
|
||||
abort();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user