summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorKarl Palsson <karlp@tweak.net.au>2016-09-09 21:11:05 +0000
committerKarl Palsson <karlp@tweak.net.au>2016-09-09 22:16:45 +0000
commit075229952e17b0b40b3144696405070f32e29f5f (patch)
treecd6f2ae4bcdbda5c7fabb8c496f2a1afd64998d2 /tests
parentfc60dd45e4780bbfd5d6e78da723c4a9c857bfdc (diff)
downloadolsndot-075229952e17b0b40b3144696405070f32e29f5f.tar.gz
olsndot-075229952e17b0b40b3144696405070f32e29f5f.tar.bz2
olsndot-075229952e17b0b40b3144696405070f32e29f5f.zip
adc-power: f3 adc peripheral takes over gpios automatically?
Doesn't seem to have any impact when just hooking up a pot to the pins at least.
Diffstat (limited to 'tests')
-rw-r--r--tests/adc-power/main-stm32f3-disco.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/adc-power/main-stm32f3-disco.c b/tests/adc-power/main-stm32f3-disco.c
index ac678b1..fd155fa 100644
--- a/tests/adc-power/main-stm32f3-disco.c
+++ b/tests/adc-power/main-stm32f3-disco.c
@@ -104,9 +104,11 @@ int main(void)
gpio_set(GPIOE, GPIO8);
printf("hi guys!\n");
- rcc_periph_clock_enable(RCC_GPIOA);
- gpio_mode_setup(GPIOA, GPIO_MODE_ANALOG, GPIO_PUPD_NONE, GPIO1);
- gpio_mode_setup(GPIOA, GPIO_MODE_ANALOG, GPIO_PUPD_NONE, GPIO5);
+ // ADC seems to take these no matter what?
+// rcc_periph_clock_enable(RCC_GPIOA);
+// rcc_periph_clock_enable(RCC_GPIOF);
+// gpio_mode_setup(GPIOA, GPIO_MODE_ANALOG, GPIO_PUPD_NONE, GPIO0);
+// gpio_mode_setup(GPIOF, GPIO_MODE_ANALOG, GPIO_PUPD_NONE, GPIO4);
adc_power_init();
for (i = 0; i < 0x1000; i++) { /* need as much as 10 usecs for vreg */