mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-28 17:33:37 +08:00
Replacing usleep with px4_usleep
This is a step towards isolating time from the system.
This commit is contained in:
@@ -220,7 +220,7 @@ int board_adc_init()
|
||||
/* do calibration if supported */
|
||||
#ifdef ADC_CR2_CAL
|
||||
rCR2 |= ADC_CR2_CAL;
|
||||
usleep(100);
|
||||
px4_usleep(100);
|
||||
|
||||
if (rCR2 & ADC_CR2_CAL) {
|
||||
return -1;
|
||||
@@ -260,11 +260,11 @@ int board_adc_init()
|
||||
|
||||
/* power-cycle the ADC and turn it on */
|
||||
rCR2 &= ~ADC_CR2_ADON;
|
||||
usleep(10);
|
||||
px4_usleep(10);
|
||||
rCR2 |= ADC_CR2_ADON;
|
||||
usleep(10);
|
||||
px4_usleep(10);
|
||||
rCR2 |= ADC_CR2_ADON;
|
||||
usleep(10);
|
||||
px4_usleep(10);
|
||||
|
||||
/* kick off a sample and wait for it to complete */
|
||||
hrt_abstime now = hrt_absolute_time();
|
||||
@@ -541,7 +541,7 @@ test(void)
|
||||
}
|
||||
|
||||
printf("\n");
|
||||
usleep(500000);
|
||||
px4_usleep(500000);
|
||||
}
|
||||
|
||||
exit(0);
|
||||
|
||||
Reference in New Issue
Block a user