mirror of
https://github.com/0xFEEDC0DE64/arduino-esp32.git
synced 2025-07-02 05:20:59 +02:00
IDF master c69f0ec32 (#5449)
esp-dsp: master f4d7d6e esp-face: master 420fc7e esp-rainmaker: f1b82c7 esp32-camera: master 6a9497b esp_littlefs: master b58f00c
This commit is contained in:
@ -8,7 +8,8 @@
|
||||
#include "esp_flash_partitions.h"
|
||||
#include "esp_image_format.h"
|
||||
#include "esp_app_format.h"
|
||||
// RESET_REASON is declared in rom/rtc.h
|
||||
// [refactor-todo]: we shouldn't expose ROM header files in a public API header, remove them in v5.0
|
||||
// Tracked in IDF-1968
|
||||
#if CONFIG_IDF_TARGET_ESP32
|
||||
#include "esp32/rom/rtc.h"
|
||||
#elif CONFIG_IDF_TARGET_ESP32S2
|
||||
@ -62,18 +63,37 @@ bool bootloader_common_ota_select_valid(const esp_ota_select_entry_t *s);
|
||||
bool bootloader_common_ota_select_invalid(const esp_ota_select_entry_t *s);
|
||||
|
||||
/**
|
||||
* @brief Check if the GPIO input is a long hold or a short hold.
|
||||
* @brief Check if a GPIO input is held low for a long period, short period, or not
|
||||
* at all.
|
||||
*
|
||||
* This function will configure the specified GPIO as an input with internal pull-up enabled.
|
||||
*
|
||||
* Number of the GPIO input will be configured as an input with internal pull-up enabled.
|
||||
* If the GPIO input is held low continuously for delay_sec period then it is a long hold.
|
||||
* If the GPIO input is held low for less period then it is a short hold.
|
||||
*
|
||||
* @param[in] num_pin Number of the GPIO input.
|
||||
* @param[in] delay_sec Input must be driven low for at least this long, continuously.
|
||||
* @return esp_comm_gpio_hold_t Defines type of hold a GPIO in low state.
|
||||
* @return esp_comm_gpio_hold_t Type of low level hold detected, if any.
|
||||
*/
|
||||
esp_comm_gpio_hold_t bootloader_common_check_long_hold_gpio(uint32_t num_pin, uint32_t delay_sec);
|
||||
|
||||
/**
|
||||
* @brief Check if a GPIO input is held low or high for a long period, short period, or not
|
||||
* at all.
|
||||
*
|
||||
* This function will configure the specified GPIO as an input with internal pull-up enabled.
|
||||
*
|
||||
* If the GPIO input is held at 'level' continuously for delay_sec period then it is a long hold.
|
||||
* If the GPIO input is held at 'level' for less period then it is a short hold.
|
||||
*
|
||||
* @param[in] num_pin Number of the GPIO input.
|
||||
* @param[in] delay_sec Input must be driven to 'level' for at least this long, continuously.
|
||||
* @param[in] level Input pin level to trigger on hold
|
||||
* @return esp_comm_gpio_hold_t Type of hold detected, if any.
|
||||
*/
|
||||
esp_comm_gpio_hold_t bootloader_common_check_long_hold_gpio_level(uint32_t num_pin, uint32_t delay_sec, bool level);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Erase the partition data that is specified in the transferred list.
|
||||
*
|
||||
|
Reference in New Issue
Block a user