From: Nathael Pajani Date: Thu, 18 Sep 2014 19:53:11 +0000 (+0200) Subject: The previous test may never come true if we do not set the flag X-Git-Url: http://git.techno-innov.fr/?a=commitdiff_plain;h=ba69a72af14c577f1603ac60af3fd219cbb30591;p=soft%2Flpc122x%2Fcore The previous test may never come true if we do not set the flag --- diff --git a/drivers/tmp101_temp_sensor.c b/drivers/tmp101_temp_sensor.c index fef9bc5..e358c75 100644 --- a/drivers/tmp101_temp_sensor.c +++ b/drivers/tmp101_temp_sensor.c @@ -123,6 +123,7 @@ int tmp101_sensor_read(uint16_t* raw, int* deci_degrees) } else { /* Send (write) temperature register address to TMP101 internal pointer */ ret = i2c_read(cmd_buf, CMD_BUF_SIZE, ctrl_buf, (char*)&temp, 2); + last_accessed_register = TMP_REG_TEMPERATURE; } if (ret == 2) {