mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
cpu/stm32f0: adc: Add default error cases
This commit is contained in:
parent
30e42669d6
commit
ade9941ab6
@ -53,6 +53,8 @@ int adc_init(adc_t dev, adc_precision_t precision)
|
||||
(3 << ADC_0_CH4_PIN) | (3 << ADC_0_CH5_PIN));
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* reset control registers */
|
||||
@ -79,7 +81,6 @@ int adc_init(adc_t dev, adc_precision_t precision)
|
||||
case ADC_RES_16BIT:
|
||||
adc_poweroff(dev);
|
||||
return -1;
|
||||
break;
|
||||
}
|
||||
|
||||
/* configure sampling time to 41.5 cycles */
|
||||
@ -123,6 +124,8 @@ int adc_sample(adc_t dev, int channel)
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* start single conversion */
|
||||
|
Loading…
Reference in New Issue
Block a user