[][src]Function esp_idf_sys::gpio_hold_en

pub unsafe extern "C" fn gpio_hold_en(gpio_num: gpio_num_t) -> esp_err_t

@brief Enable gpio pad hold function.

The gpio pad hold function works in both input and output modes, but must be output-capable gpios. If pad hold enabled: in output mode: the output level of the pad will be force locked and can not be changed. in input mode: the input value read will not change, regardless the changes of input signal.

The state of digital gpio cannot be held during Deep-sleep, and it will resume the hold function when the chip wakes up from Deep-sleep. If the digital gpio also needs to be held during Deep-sleep, gpio_deep_sleep_hold_en should also be called.

Power down or call gpio_hold_dis will disable this function.

@param gpio_num GPIO number, only support output-capable GPIOs

@return - ESP_OK Success - ESP_ERR_NOT_SUPPORTED Not support pad hold function