Skip to content

Commit

Permalink
Merge pull request RIOT-OS#12863 from bergzand/pr/saul/ignore_extra_dims
Browse files Browse the repository at this point in the history
saul: Ignore extra dimensions in read functions
  • Loading branch information
leandrolanzieri authored Dec 5, 2019
2 parents cf6a0b4 + cae369b commit 5c6410b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 4 deletions.
2 changes: 0 additions & 2 deletions drivers/saul/adc_saul.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ static int read_adc(const void *dev, phydat_t *res)
{
const saul_adc_params_t *params = *((const saul_adc_params_t **)dev);
res->val[0] = adc_sample(params->line, params->res);
res->val[1] = 0;
res->val[2] = 0;
/* Raw ADC reading has no unit */
res->unit = UNIT_NONE;
res->scale = 0;
Expand Down
2 changes: 0 additions & 2 deletions drivers/saul/gpio_saul.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ static int read(const void *dev, phydat_t *res)

res->val[0] = (gpio_read(p->pin)) ? !inverted : inverted;

res->val[1] = 0;
res->val[2] = 0;
res->unit = UNIT_BOOL;
res->scale = 0;
return 1;
Expand Down

0 comments on commit 5c6410b

Please sign in to comment.