mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-25 17:52:36 +00:00
bootloader: Small cleanup and docs for factory reset level config
- Add to docs & config descriptions - Change to a "choice" to become self-documenting - Keep the bootloader_common_check_long_hold_gpio() function for compatibility
This commit is contained in:
@@ -79,7 +79,11 @@ static int selected_boot_partition(const bootloader_state_t *bs)
|
||||
if (bootloader_common_get_reset_reason(0) != DEEPSLEEP_RESET) {
|
||||
// Factory firmware.
|
||||
#ifdef CONFIG_BOOTLOADER_FACTORY_RESET
|
||||
if (bootloader_common_check_long_hold_gpio(CONFIG_BOOTLOADER_NUM_PIN_FACTORY_RESET, CONFIG_BOOTLOADER_HOLD_TIME_GPIO, CONFIG_BOOTLOADER_PIN_LEVEL_FACTORY_RESET) == 1) {
|
||||
bool reset_level = false;
|
||||
#if CONFIG_BOOTLOADER_FACTORY_RESET_PIN_HIGH
|
||||
reset_level = true;
|
||||
#endif
|
||||
if (bootloader_common_check_long_hold_gpio_level(CONFIG_BOOTLOADER_NUM_PIN_FACTORY_RESET, CONFIG_BOOTLOADER_HOLD_TIME_GPIO, reset_level) == GPIO_LONG_HOLD) {
|
||||
ESP_LOGI(TAG, "Detect a condition of the factory reset");
|
||||
bool ota_data_erase = false;
|
||||
#ifdef CONFIG_BOOTLOADER_OTA_DATA_ERASE
|
||||
|
Reference in New Issue
Block a user