summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarl Palsson <karlp@tweak.net.au>2016-09-09 21:11:46 +0000
committerKarl Palsson <karlp@tweak.net.au>2016-09-09 22:16:45 +0000
commit55cf5bcd76af3d8137ee0d34ff4507c122540daa (patch)
tree698906d727a56ccbe62f6cb12b4d14774b3c3c48
parent075229952e17b0b40b3144696405070f32e29f5f (diff)
downloadolsndot-55cf5bcd76af3d8137ee0d34ff4507c122540daa.tar.gz
olsndot-55cf5bcd76af3d8137ee0d34ff4507c122540daa.tar.bz2
olsndot-55cf5bcd76af3d8137ee0d34ff4507c122540daa.zip
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
-rw-r--r--tests/adc-power/adc-power.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/adc-power/adc-power.c b/tests/adc-power/adc-power.c
index 9b6df07..4ab5e23 100644
--- a/tests/adc-power/adc-power.c
+++ b/tests/adc-power/adc-power.c
@@ -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);
}