Replacing usleep with px4_usleep

This is a step towards isolating time from the system.
This commit is contained in:
Julian Oes
2018-12-22 10:32:18 +01:00
parent e485885344
commit 5b9dea5604
112 changed files with 339 additions and 305 deletions
+4 -4
View File
@@ -703,7 +703,7 @@ pwm_main(int argc, char *argv[])
/* Delay longer than the max Oneshot duration */
usleep(2542);
px4_usleep(2542);
#ifdef __PX4_NUTTX
/* Trigger all timer's channels in Oneshot mode to fire
@@ -828,13 +828,13 @@ err_out_no_test:
}
if (phase == 1) {
usleep(steps_timings_us[steps_timing_index] / phase_maxcount);
px4_usleep(steps_timings_us[steps_timing_index] / phase_maxcount);
} else if (phase == 0) {
usleep(50000);
px4_usleep(50000);
} else if (phase == 2) {
usleep(50000);
px4_usleep(50000);
} else {
break;