pub unsafe extern "C" fn esp_sleep_enable_gpio_wakeup() -> esp_err_tExpand 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 1. On ESP32, GPIO wakeup source can not be used together with touch or ULP wakeup sources.
2. If PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP is enabled (if target supported),
this API is unavailable since the GPIO module is powered down during sleep.
You can use esp_deep_sleep_enable_gpio_wakeup instead, or use EXT1 wakeup source
by esp_sleep_enable_ext1_wakeup_io to achieve the same function.
(Only GPIOs which have RTC functionality can be used)
@return - ESP_OK on success - ESP_ERR_INVALID_STATE if wakeup triggers conflict