Merge remote-tracking branch 'origin/main'

This commit is contained in:
Hosted Weblate 2022-04-06 19:22:08 +02:00
commit 67dea13392
No known key found for this signature in database
GPG Key ID: A3FAAA06E6569B4C
2 changed files with 8 additions and 0 deletions

View File

@ -188,6 +188,10 @@ bool espressif_board_reset_pin_number(gpio_num_t pin_number) {
gpio_config(&cfg);
return true;
}
// Pin 4 is used for voltage monitoring, so don't reset
if (pin_number == 4) {
return true;
}
return false;
}

View File

@ -55,6 +55,10 @@ void common_hal_analogio_analogin_construct(analogio_analogin_obj_t *self,
}
common_hal_mcu_pin_claim(pin);
self->pin = pin;
// Pull-ups are enabled by default for power-saving reasons on quiescent pins.
// Turn off the pull-up as soon as we know the pin will be used for analog reads,
// since it may take a while for the voltage to stabilize if the input is high-impedance.
gpio_pullup_dis(pin->number);
}
bool common_hal_analogio_analogin_deinited(analogio_analogin_obj_t *self) {