From 9b3bbc0f09528a4cc487f666c696939d14fba551 Mon Sep 17 00:00:00 2001 From: Konstantin Berezenko Date: Wed, 17 Aug 2016 13:02:36 -0700 Subject: [PATCH] Change stm32 adc dma callback to send channel number instead of index --- 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 31109fd8f5..2972ebaf9a 100644 --- a/arch/arm/src/stm32/stm32_adc.c +++ b/arch/arm/src/stm32/stm32_adc.c @@ -1657,7 +1657,7 @@ static void adc_dmaconvcallback(DMA_HANDLE handle, uint8_t isr, FAR void *arg) for (i = 0; i < priv->nchannels; i++) { - priv->cb->au_receive(dev, priv->current, priv->dmabuffer[priv->current]); + priv->cb->au_receive(dev, priv->chanlist[priv->current], priv->dmabuffer[priv->current]); priv->current++; if (priv->current >= priv->nchannels) {