Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 575a415

Browse files
fix (adc): fixes limit test (espressif#9807)
Fixes analogContinuousSetWidth() border test.
1 parent 034d568 commit 575a415

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎cores/esp32/esp32-hal-adc.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -682,7 +682,7 @@ void analogContinuousSetAtten(adc_attenuation_t attenuation) {
682682
}
683683

684684
void analogContinuousSetWidth(uint8_t bits) {
685-
if ((bits < SOC_ADC_DIGI_MIN_BITWIDTH) && (bits > SOC_ADC_DIGI_MAX_BITWIDTH)) {
685+
if ((bits < SOC_ADC_DIGI_MIN_BITWIDTH) || (bits > SOC_ADC_DIGI_MAX_BITWIDTH)) {
686686
log_e("Selected width cannot be set. Range is from %d to %d", SOC_ADC_DIGI_MIN_BITWIDTH, SOC_ADC_DIGI_MAX_BITWIDTH);
687687
return;
688688
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /