From: Nathael Pajani Date: Mon, 26 Sep 2016 15:57:56 +0000 (+0200) Subject: Bugfix : did not use the right variable name X-Git-Url: http://git.techno-innov.fr/?a=commitdiff_plain;h=6eb1b37db716d9b4b66457922670621e2d495c08;p=soft%2Flpc82x%2Fexamples Bugfix : did not use the right variable name --- diff --git a/i2c_temp/main.c b/i2c_temp/main.c index bff64df..e265fe3 100644 --- a/i2c_temp/main.c +++ b/i2c_temp/main.c @@ -84,12 +84,12 @@ void temp_display(int uart_num) { uint16_t raw = 0; int deci_degrees = 0; - int len = 0; + int ret = 0; tmp101_sensor_start_conversion(&tmp101_sensor); msleep(250); /* Wait for the end of the conversion : 40ms */ - len = tmp101_sensor_read(&tmp101_sensor, &raw, &deci_degrees); - if (len != 0) { + ret = tmp101_sensor_read(&tmp101_sensor, &raw, &deci_degrees); + if (ret != 0) { uprintf(uart_num, "Temp read error: %d\n", ret); } else { uprintf(uart_num, "Temp read: %d,%d - raw: 0x%04x.\n",