Skip to content

Commit

Permalink
fixup! fixup! drivers/tmp00x : Model as bool
Browse files Browse the repository at this point in the history
  • Loading branch information
akshaim committed May 18, 2020
1 parent 5f19159 commit a47dc87
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions drivers/saul/init_devs/auto_init_tmp00x.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@ void auto_init_tmp00x(void)
LOG_ERROR("[auto_init_saul] error set active tmp00x #%u\n", i);
continue;
}
if (IS_ACTIVE(CONFIG_TMP00X_USE_LOW_POWER)) {
if (IS_ACTIVE(CONFIG_TMP00X_USE_LOW_POWER)) {
if (tmp00x_set_standby(&tmp00x_devs[i]) != TMP00X_OK) {
LOG_ERROR("[auto_init_saul] error set standby tmp00x #%u\n", i);
continue;
}
}
}
saul_entries[i].dev = &(tmp00x_devs[i]);
saul_entries[i].name = tmp00x_saul_info[i].name;
saul_entries[i].driver = &tmp00x_saul_driver;
Expand Down
10 changes: 5 additions & 5 deletions drivers/tmp00x/tmp00x.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ int tmp00x_read_temperature(const tmp00x_t *dev, int16_t *ta, int16_t *to)

if (!drdy) {
if (IS_ACTIVE(CONFIG_TMP00X_USE_LOW_POWER)) {
tmp00x_set_standby(dev);
tmp00x_set_standby(dev);
}
return -TMP00X_ERROR;
}
Expand All @@ -233,11 +233,11 @@ int tmp00x_read_temperature(const tmp00x_t *dev, int16_t *ta, int16_t *to)
if (IS_ACTIVE(CONFIG_TMP00X_USE_LOW_POWER)) {
tmp00x_set_standby(dev);
}
return -TMP00X_ERROR;
return -TMP00X_ERROR;
}
tmp00x_convert(rawvolt, rawtemp, &tamb, &tobj);
*ta = (int16_t)(tamb*100);
*to = (int16_t)(tobj*100);
tmp00x_convert(rawvolt, rawtemp, &tamb, &tobj);
*ta = (int16_t)(tamb*100);
*to = (int16_t)(tobj*100);
}

if (IS_ACTIVE(CONFIG_TMP00X_USE_LOW_POWER)) {
Expand Down

0 comments on commit a47dc87

Please sign in to comment.