pub unsafe extern "C" fn bootloader_common_check_long_hold_gpio_level(
    num_pin: u32,
    delay_sec: u32,
    level: bool
) -> i32
Expand description

@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.