Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
warp_esp32_i2c, warp_esp32_rtc: Reduce I2C timeout durations
I2C accesses are performed blocking and in case of a missing response, the main task is blocked for the full timeout duration. I2C responses are either very quick or missing completely, so there's no point in using long timeout durations. Reduce the timeouts to sensible minimums, to avoid blocking the main task for too long when either I2C chip stops responding. The temperature sensor replies usually take less than 1ms, sometimes up to 3ms, so use 6ms to be safe. The RTC replies usually take about 0.5ms, sometimes up to 2ms, so use 4ms to be safe.
- Loading branch information