From e10a6647e9fec1b9eb11fc5e7039a60d1805636a Mon Sep 17 00:00:00 2001 From: raiden00pl Date: Wed, 3 Mar 2021 18:48:27 +0100 Subject: [PATCH] stm32/stm32_adc.c: fix initial sample time write --- arch/arm/src/stm32/stm32_adc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/src/stm32/stm32_adc.c b/arch/arm/src/stm32/stm32_adc.c index 8e2006c09d..e9c9d81a3b 100644 --- a/arch/arm/src/stm32/stm32_adc.c +++ b/arch/arm/src/stm32/stm32_adc.c @@ -2498,7 +2498,7 @@ static void adc_sampletime_cfg(FAR struct adc_dev_s *dev) */ #ifdef CONFIG_STM32_ADC_CHANGE_SAMPLETIME - adc_sampletime_write((FAR struct stm32_adc_dev_s *)dev); + adc_sampletime_write((FAR struct stm32_adc_dev_s *)dev->ad_priv); #else FAR struct stm32_dev_s *priv = (FAR struct stm32_dev_s *)dev->ad_priv;