diff options
author | Karl Palsson <karlp@tweak.net.au> | 2016-09-09 21:11:05 +0000 |
---|---|---|
committer | Karl Palsson <karlp@tweak.net.au> | 2016-09-09 22:16:45 +0000 |
commit | 075229952e17b0b40b3144696405070f32e29f5f (patch) | |
tree | cd6f2ae4bcdbda5c7fabb8c496f2a1afd64998d2 | |
parent | fc60dd45e4780bbfd5d6e78da723c4a9c857bfdc (diff) | |
download | olsndot-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.
-rw-r--r-- | tests/adc-power/main-stm32f3-disco.c | 8 |
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 */ |