bootloader_common_check_long_hold_gpio_level() function
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.
Arguments
num_pin
Number of the GPIO input.
delay_sec
Input must be driven to 'level' for at least this long, continuously.
level
Input pin level to trigger on hold
Return value
esp_comm_gpio_hold_t Type of hold detected, if any.
bootloader_common_check_long_hold_gpio_level() is called by 1 function and calls 5 functions:
![]()
bootloader_common_check_long_hold_gpio_level()
bootloader_common_check_long_hold_gpio_level() reads 3 variables:
![]()
bootloader_common_check_long_hold_gpio_level()