Git
Wiki
Site
projects
/
soft
/
lpc82x
/
examples
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4ffb095
)
Bugfix : did not use the right variable name
author
Nathael Pajani
<nathael.pajani@ed3l.fr>
Mon, 26 Sep 2016 15:57:56 +0000
(17:57 +0200)
committer
Nathael Pajani
<nathael.pajani@ed3l.fr>
Sat, 11 Feb 2023 04:06:55 +0000
(
05:06
+0100)
i2c_temp/main.c
patch
|
blob
|
history
diff --git
a/i2c_temp/main.c
b/i2c_temp/main.c
index
bff64df
..
e265fe3
100644
(file)
--- 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",
Techno-Innov
42 impasse de la Combe du Bois
01150 Blyes - France
contact@techno-innov.fr
Design et hébergement du site :
Techno-Innov
Techno-Innov
- SARL Coopérative
539 169 417 RCS Bourg-en-Bresse
Ce site n'utilise pas de cookies, désolé pour les gourmands !