From: Nathael Pajani Date: Tue, 13 Sep 2016 16:24:44 +0000 (+0200) Subject: Add a small delay between two consecutive access to the same sensor. X-Git-Url: http://git.techno-innov.fr/?a=commitdiff_plain;h=4943d9d6da16983c03aeedf484e74961b86159f5;p=soft%2Flpc82x%2Fcore Add a small delay between two consecutive access to the same sensor. --- diff --git a/extdrv/tmp101_temp_sensor.c b/extdrv/tmp101_temp_sensor.c index 81af7f5..3d1313e 100644 --- a/extdrv/tmp101_temp_sensor.c +++ b/extdrv/tmp101_temp_sensor.c @@ -160,6 +160,7 @@ int tmp101_sensor_config(struct tmp101_sensor_config* conf) conf->actual_config = (TMP_SHUTDOWN_MODE_ON | TMP_THERMOSTAT_INTERRUPT_MODE | TMP_ALERT_POLARITY_HIGH); conf->actual_config |= (conf->resolution & (0x03 << 5)); cmd[2] = conf->actual_config; + msleep(1); ret = i2c_write(conf->bus_num, cmd, 3, NULL); conf->last_accessed_register = TMP_REG_CONFIG; if (ret == 3) {