Browse Source

drivers: adc: adc_stm32: fix clock setup

Fix clock setup for stm32 f3, l4, wb and g4 series.

The macro __LL_ADC_COMMON_INSTANCE() is called without argument, which
leads to a compile error. Fix by passing adc parameter.

Signed-off-by: Thomas Schmid <tom@lfence.de>
pull/21326/head
Thomas Schmid 6 years ago committed by Anas Nashif
parent
commit
91e39d5ee7
  1. 2
      drivers/adc/adc_stm32.c

2
drivers/adc/adc_stm32.c

@ -532,7 +532,7 @@ static int adc_stm32_init(struct device *dev) @@ -532,7 +532,7 @@ static int adc_stm32_init(struct device *dev)
defined(CONFIG_SOC_SERIES_STM32L4X) || \
defined(CONFIG_SOC_SERIES_STM32WBX) || \
defined(CONFIG_SOC_SERIES_STM32G4X)
LL_ADC_SetCommonClock(__LL_ADC_COMMON_INSTANCE(),
LL_ADC_SetCommonClock(__LL_ADC_COMMON_INSTANCE(adc),
LL_ADC_CLOCK_SYNC_PCLK_DIV4);
#endif

Loading…
Cancel
Save