Function esp_idf_svc::sys::bootloader_common_check_long_hold_gpio

source ยท
pub unsafe extern "C" fn bootloader_common_check_long_hold_gpio(
    num_pin: u32,
    delay_sec: u32,
) -> i32
Expand description

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

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 Type of low level hold detected, if any.