From f9f13e3c03a7fc841798284ba6393433e80c20c8 Mon Sep 17 00:00:00 2001 From: patacongo Date: Thu, 15 Dec 2011 01:24:36 +0000 Subject: [PATCH] Oops fix screw-up in last check-in git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4183 42af7a65-404d-4744-a932-0658087f49c3 --- arch/arm/src/stm32/stm32_adc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/arm/src/stm32/stm32_adc.c b/arch/arm/src/stm32/stm32_adc.c index ddf0ece14c..e02129877c 100644 --- a/arch/arm/src/stm32/stm32_adc.c +++ b/arch/arm/src/stm32/stm32_adc.c @@ -504,27 +504,27 @@ static void adc_reset(FAR struct adc_dev_s *dev) L = L << 20; regval = adc_getreg(priv, STM32_ADC_SQR1_OFFSET); regval &= ~ADC_SQR1_L_MASK; /* Clear L Mask */ - regval |= L; /* SetL, # of convertions */ + regval |= L; /* SetL, # of conversions */ adc_putreg(priv, STM32_ADC_SQR1_OFFSET, regval); - /* Configuration of the channels convertions */ + /* Configuration of the channels conversions */ regval = adc_getreg(priv, STM32_ADC_SQR3_OFFSET) & ~ADC_SQR3_RESERVED; - if (i = 1, offset = 0; i <= priv->nchannels && i <= 6; i++, offset += 5) + for (i = 1, offset = 0; i <= priv->nchannels && i <= 6; i++, offset += 5) { regval |= (uint32_t)priv->chanlist[i-1] << offset; } adc_putreg(priv, STM32_ADC_SQR3_OFFSET, regval); regval = adc_getreg(priv, STM32_ADC_SQR2_OFFSET) & ~ADC_SQR2_RESERVED; - if (i = 7, offset = 0; i <= priv->nchannels && i <= 12; i++, offset += 5) + for (i = 7, offset = 0; i <= priv->nchannels && i <= 12; i++, offset += 5) { regval |= (uint32_t)priv->chanlist[i-1] << offset; } adc_putreg(priv, STM32_ADC_SQR2_OFFSET, regval); regval = adc_getreg(priv, STM32_ADC_SQR1_OFFSET) & ~ADC_SQR1_RESERVED; - if (i = 13, offset = 0; i <= priv->nchannels && i <= 16; i++, offset += 5) + for (i = 13, offset = 0; i <= priv->nchannels && i <= 16; i++, offset += 5) { regval |= (uint32_t)priv->chanlist[i-1] << offset; }