Skip to content

Commit

Permalink
fixup! cpu/stm32l1: fix ADC initialization & resolution setting
Browse files Browse the repository at this point in the history
Co-authored-by: benpicco <benpicco@googlemail.com>
  • Loading branch information
crasbe and benpicco authored Nov 27, 2024
1 parent 5de25c6 commit c70b776
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cpu/stm32/periph/adc_l1.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ int32_t adc_sample(adc_t line, adc_res_t res)
ADC1->SQR5 = adc_config[line].chan;

/* only set ADON when ADONS bit is cleared (ADC not ready) */
if(!(ADC1->SR & ADC_SR_ADONS_Msk)) {
if (!(ADC1->SR & ADC_SR_ADONS_Msk)) {
ADC1->CR2 |= ADC_CR2_ADON;
}

Expand Down

0 comments on commit c70b776

Please sign in to comment.