mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
drivers/adcxx1c: fix SAUL return value in case of read error
This commit is contained in:
parent
a9a30c0c0f
commit
38da047864
@ -26,7 +26,9 @@
|
||||
|
||||
static int read_adc(const void *dev, phydat_t *res)
|
||||
{
|
||||
adcxx1c_read_raw((const adcxx1c_t *)dev, res->val);
|
||||
if (adcxx1c_read_raw((const adcxx1c_t *)dev, res->val)) {
|
||||
return -ECANCELED;
|
||||
}
|
||||
|
||||
res->unit = UNIT_NONE;
|
||||
res->scale = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user