08-16-2020 02:34 PM
Hi
Regarding the BME280 driver from Bosch, the function bme280_cal_meas_delay returns the required delay in millisecs. The return value is stored in the variable req_delay and then used in the following function call:
/* Wait for the measurement to complete and print data */
dev->delay_us(req_delay, dev->intf_ptr);
It seems there an unit error, because the dev->delay_us provides an mricosecond delay.
Is my understanding correct?
BR
Gilberto
08-17-2020 11:04 PM
Actually the return value of bme280_cal_meas_delay is us.
You can see the parameter define in bme280_defs.h, we convert all value from ms to us when we calculation.
So you can directly call delay_us.