From cef0b70c8814b67a376d2574e62b8e221cc94e89 Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Tue, 13 Dec 2022 12:36:26 -0500 Subject: stm32: Move clock line mapping from stm32h7_adc.c to lookup_clock_line() Use the common lookup_clock_line() code to lookup the adc clock lines. This also enables resets on the adc1/adc2 hardware block. Signed-off-by: Kevin O'Connor --- src/stm32/stm32l4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/stm32/stm32l4.c') diff --git a/src/stm32/stm32l4.c b/src/stm32/stm32l4.c index 0555ae3e..7db15fff 100644 --- a/src/stm32/stm32l4.c +++ b/src/stm32/stm32l4.c @@ -42,7 +42,7 @@ lookup_clock_line(uint32_t periph_base) .rst = &RCC->AHB1RSTR, .bit = 1 << pos}; - } else if (periph_base == ADC1_BASE) { + } else if (periph_base == ADC12_COMMON_BASE) { return (struct cline){.en = &RCC->AHB2ENR, .rst = &RCC->AHB2RSTR, .bit = RCC_AHB2ENR_ADCEN}; -- cgit v1.2.3-70-g09d2