Browse Source

[stm32][f1|f3] fix adc_set_injected_sequence

pull/254/head
Felix Ruess 11 years ago
parent
commit
8782a60b48
  1. 2
      lib/stm32/f1/adc.c
  2. 2
      lib/stm32/f3/adc.c

2
lib/stm32/f1/adc.c

@ -1096,7 +1096,7 @@ void adc_set_injected_sequence(uint32_t adc, uint8_t length, uint8_t channel[])
return;
}
for (i = 1; i <= length; i++) {
for (i = 0; i < length; i++) {
reg32 |= ADC_JSQR_JSQ_VAL(4 - i, channel[length - i - 1]);
}

2
lib/stm32/f3/adc.c

@ -702,7 +702,7 @@ void adc_set_injected_sequence(uint32_t adc, uint8_t length, uint8_t channel[])
return;
}
for (i = 1; i <= length; i++) {
for (i = 0; i < length; i++) {
reg32 |= ADC_JSQR_JSQ_VAL(4 - i, channel[length - i - 1]);
}

Loading…
Cancel
Save