drivers: adc: lmp90xxx: convert to use k_msleep() instead of k_sleep()
Convert the LMP90xxx ADC driver from using k_sleep() to using k_msleep() in order to resolve a compilation error caused by passing an int to k_sleep(). Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
This commit is contained in:
parent
8dc6f9f5dd
commit
1985ddf236
1 changed files with 2 additions and 2 deletions
|
@ -601,7 +601,7 @@ static int lmp90xxx_adc_read_channel(struct device *dev, u8_t channel,
|
||||||
odr = data->channel_odr[channel];
|
odr = data->channel_odr[channel];
|
||||||
delay = lmp90xxx_odr_delay_tbl[odr];
|
delay = lmp90xxx_odr_delay_tbl[odr];
|
||||||
LOG_DBG("sleeping for %d ms", delay);
|
LOG_DBG("sleeping for %d ms", delay);
|
||||||
k_sleep(delay);
|
k_msleep(delay);
|
||||||
|
|
||||||
/* Poll for data ready */
|
/* Poll for data ready */
|
||||||
do {
|
do {
|
||||||
|
@ -609,7 +609,7 @@ static int lmp90xxx_adc_read_channel(struct device *dev, u8_t channel,
|
||||||
&adc_done);
|
&adc_done);
|
||||||
if (adc_done == 0xFFU) {
|
if (adc_done == 0xFFU) {
|
||||||
LOG_DBG("sleeping for 1 ms");
|
LOG_DBG("sleeping for 1 ms");
|
||||||
k_sleep(K_MSEC(1));
|
k_msleep(1);
|
||||||
} else {
|
} else {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue