Function esp_idf_svc::hal::sys::gpio_hold_dis
source · pub unsafe extern "C" fn gpio_hold_dis(gpio_num: i32) -> i32
Expand description
@brief Disable gpio pad hold function.
When the chip is woken up from Deep-sleep, the gpio will be set to the default mode, so, the gpio will output
the default level if this function is called. If you don’t want the level changes, the gpio should be configured to
a known state before this function is called.
e.g.
If you hold gpio18 high during Deep-sleep, after the chip is woken up and gpio_hold_dis
is called,
gpio18 will output low level(because gpio18 is input mode by default). If you don’t want this behavior,
you should configure gpio18 as output mode and set it to hight level before calling gpio_hold_dis
.
@param gpio_num GPIO number, only support output-capable GPIOs
@return - ESP_OK Success - ESP_ERR_NOT_SUPPORTED Not support pad hold function