1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #12863 from bergzand/pr/saul/ignore_extra_dims

saul: Ignore extra dimensions in read functions
This commit is contained in:
Leandro Lanzieri 2019-12-05 11:03:48 +01:00 committed by GitHub
commit 5c6410b594
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 4 deletions

View File

@ -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;

View File

@ -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;