Function esp_idf_sys::esp_sleep_enable_gpio_wakeup
source ยท pub unsafe extern "C" fn esp_sleep_enable_gpio_wakeup() -> esp_err_t
Expand description
@brief Enable wakeup from light sleep using GPIOs
Each GPIO supports wakeup function, which can be triggered on either low level or high level. Unlike EXT0 and EXT1 wakeup sources, this method can be used both for all IOs: RTC IOs and digital IOs. It can only be used to wakeup from light sleep though.
To enable wakeup, first call gpio_wakeup_enable, specifying gpio number and wakeup level, for each GPIO which is used for wakeup. Then call this function to enable wakeup feature.
@note On ESP32, GPIO wakeup source can not be used together with touch or ULP wakeup sources.
@return - ESP_OK on success - ESP_ERR_INVALID_STATE if wakeup triggers conflict