stm32/stm32_adc.c: fix initial sample time write

This commit is contained in:
raiden00pl 2021-03-03 18:48:27 +01:00 committed by Alan Carvalho de Assis
parent 1b8a690b7c
commit e10a6647e9

View File

@ -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;