From 075229952e17b0b40b3144696405070f32e29f5f Mon Sep 17 00:00:00 2001 From: Karl Palsson Date: Fri, 9 Sep 2016 21:11:05 +0000 Subject: 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. --- tests/adc-power/main-stm32f3-disco.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'tests') 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 */ -- cgit