increase the I/O rate and use etimer_restart to maintain a uniform wait time between iterations
This commit is contained in:
parent
f59e89cfb9
commit
731e1da844
|
@ -28,7 +28,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* $Id: sd-test.c,v 1.6 2009/10/01 16:40:25 nvt-se Exp $
|
* $Id: sd-test.c,v 1.7 2009/11/06 15:11:52 nvt-se Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -59,7 +59,7 @@ PROCESS_THREAD(sd_test, event, data)
|
||||||
|
|
||||||
PROCESS_BEGIN();
|
PROCESS_BEGIN();
|
||||||
|
|
||||||
etimer_set(&et, CLOCK_SECOND);
|
etimer_set(&et, CLOCK_SECOND / 16);
|
||||||
|
|
||||||
offset = 0;
|
offset = 0;
|
||||||
for(iter = 1;; iter++) {
|
for(iter = 1;; iter++) {
|
||||||
|
@ -83,8 +83,10 @@ PROCESS_THREAD(sd_test, event, data)
|
||||||
} else {
|
} else {
|
||||||
printf("read error: %d (%s)\n", r, sd_error_string(r));
|
printf("read error: %d (%s)\n", r, sd_error_string(r));
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
printf("write error: %d (%s)\n", r, sd_error_string(r));
|
||||||
}
|
}
|
||||||
etimer_reset(&et);
|
etimer_restart(&et);
|
||||||
}
|
}
|
||||||
|
|
||||||
PROCESS_END();
|
PROCESS_END();
|
||||||
|
|
Loading…
Reference in a new issue