Skip to content

Commit

Permalink
fix (adc): fixes limit test (#9807)
Browse files Browse the repository at this point in the history
Fixes analogContinuousSetWidth() border test.
  • Loading branch information
SuGlider committed Jun 10, 2024
1 parent 034d568 commit 575a415
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cores/esp32/esp32-hal-adc.c
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@ void analogContinuousSetAtten(adc_attenuation_t attenuation) {
}

void analogContinuousSetWidth(uint8_t bits) {
if ((bits < SOC_ADC_DIGI_MIN_BITWIDTH) && (bits > SOC_ADC_DIGI_MAX_BITWIDTH)) {
if ((bits < SOC_ADC_DIGI_MIN_BITWIDTH) || (bits > SOC_ADC_DIGI_MAX_BITWIDTH)) {
log_e("Selected width cannot be set. Range is from %d to %d", SOC_ADC_DIGI_MIN_BITWIDTH, SOC_ADC_DIGI_MAX_BITWIDTH);
return;
}
Expand Down

0 comments on commit 575a415

Please sign in to comment.