diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-12-15 01:24:36 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-12-15 01:24:36 +0000 |
commit | cac15ac57d89257cac84cdb87f0745f372759193 (patch) | |
tree | 818ed2d8008dc1de6662548f25fa4fa1dce7b1a5 /nuttx/arch | |
parent | cc49da2349fd70372239b55118e4412fc1295538 (diff) | |
download | px4-nuttx-cac15ac57d89257cac84cdb87f0745f372759193.tar.gz px4-nuttx-cac15ac57d89257cac84cdb87f0745f372759193.tar.bz2 px4-nuttx-cac15ac57d89257cac84cdb87f0745f372759193.zip |
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
Diffstat (limited to 'nuttx/arch')
-rw-r--r-- | nuttx/arch/arm/src/stm32/stm32_adc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/nuttx/arch/arm/src/stm32/stm32_adc.c b/nuttx/arch/arm/src/stm32/stm32_adc.c index ddf0ece14..e02129877 100644 --- a/nuttx/arch/arm/src/stm32/stm32_adc.c +++ b/nuttx/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; } |