From f4ebd4a603a3a0b903424bb35ef68e9844a7dbe9 Mon Sep 17 00:00:00 2001 From: Karl Palsson Date: Fri, 4 Mar 2016 00:40:08 +0000 Subject: attempt actual adc on l4 (insufficient,needs clocks yet) --- tests/adc-power/adc-power.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/adc-power/adc-power.c') diff --git a/tests/adc-power/adc-power.c b/tests/adc-power/adc-power.c index bb70aa7..a188649 100644 --- a/tests/adc-power/adc-power.c +++ b/tests/adc-power/adc-power.c @@ -62,6 +62,12 @@ void adc_power_init(void) rcc_periph_clock_enable(RCC_ADC12); rcc_adc_prescale(RCC_CFGR2_ADCxPRES_PLL_CLK_DIV_1, RCC_CFGR2_ADCxPRES_PLL_CLK_DIV_1); adc_enable_regulator(ADC1); +#elif defined (STM32L4) + /* same same but different */ + rcc_periph_clock_enable(RCC_ADC1); + ADC_CR(ADC1) &= ~ADC_CR_DEEPPWD; + adc_enable_regulator(ADC1); + #else rcc_periph_clock_enable(RCC_ADC1); #if 0 -- cgit