adc-power: Calling adc_power_off twice should be safe

but, it's not on f3 at present.

See https://github.com/libopencm3/libopencm3/issues/654
and
https://github.com/libopencm3/libopencm3/pull/662
This commit is contained in:
Karl Palsson 2016-09-09 21:11:46 +00:00
parent 075229952e
commit 55cf5bcd76

View file

@ -164,6 +164,8 @@ void adc_power_task_down()
{
TIM_CNT(TIMER) = 0;
adc_power_off(ADC1);
/* double power off should be safe */
adc_power_off(ADC1);
unsigned int td = TIM_CNT(TIMER);
printf("toff in: %u\n", td);
}