diff --git a/drivers/adcxx1c/adcxx1c_saul.c b/drivers/adcxx1c/adcxx1c_saul.c index b2fe59686d9fa8acac1248ff68be4d89465d484d..314c6babab0d9505df8fcbb4590ec39f6de2f436 100644 --- a/drivers/adcxx1c/adcxx1c_saul.c +++ b/drivers/adcxx1c/adcxx1c_saul.c @@ -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;