@@ -433,8 +433,10 @@ __attribute__((deprecated("please use 'esp_sleep_enable_ext1_wakeup_io' and 'esp
433433 *
434434 * This function enables an IO pin to wake up the chip from deep sleep.
435435 *
436- * @note This function does not modify pin configuration. The pins are
437- * configured inside esp_deep_sleep_start, immediately before entering sleep mode.
436+ * @note 1.This function does not modify pin configuration. The pins are configured
437+ * inside `esp_deep_sleep_start`, immediately before entering sleep mode.
438+ * 2.This function is also applicable to waking up the lightsleep when the peripheral
439+ * power domain is powered off, see PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP in menuconfig.
438440 *
439441 * @note You don't need to worry about pull-up or pull-down resistors before
440442 * using this function because the ESP_SLEEP_GPIO_ENABLE_INTERNAL_RESISTORS
@@ -469,11 +471,17 @@ esp_err_t esp_deep_sleep_enable_gpio_wakeup(uint64_t gpio_pin_mask, esp_deepslee
469471 * wakeup level, for each GPIO which is used for wakeup.
470472 * Then call this function to enable wakeup feature.
471473 *
472- * @note On ESP32, GPIO wakeup source can not be used together with touch or ULP wakeup sources.
474+ * @note 1. On ESP32, GPIO wakeup source can not be used together with touch or ULP wakeup sources.
475+ * 2. If PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP is enabled (if target supported),
476+ * this API is unavailable since the GPIO module is powered down during sleep.
477+ * You can use `esp_deep_sleep_enable_gpio_wakeup` instead, or use EXT1 wakeup source
478+ * by `esp_sleep_enable_ext1_wakeup_io` to achieve the same function.
479+ * (Only GPIOs which have RTC functionality can be used)
473480 *
474481 * @return
475482 * - ESP_OK on success
476483 * - ESP_ERR_INVALID_STATE if wakeup triggers conflict
484+ * - ESP_ERR_NOT_SUPPORTED if GPIO wakeup source is not available
477485 */
478486esp_err_t esp_sleep_enable_gpio_wakeup (void );
479487
@@ -485,12 +493,15 @@ esp_err_t esp_sleep_enable_gpio_wakeup(void);
485493 * Wakeup from light sleep takes some time, so not every character sent
486494 * to the UART can be received by the application.
487495 *
488- * @note ESP32 does not support wakeup from UART2.
496+ * @note 1. ESP32 does not support wakeup from UART2.
497+ * 2. If PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP is enabled (if target supported),
498+ * this API is unavailable since the UART module is powered down during sleep.
489499 *
490500 * @param uart_num UART port to wake up from
491501 * @return
492502 * - ESP_OK on success
493503 * - ESP_ERR_INVALID_ARG if wakeup from given UART is not supported
504+ * - ESP_ERR_NOT_SUPPORTED if UART wakeup source is not available
494505 */
495506esp_err_t esp_sleep_enable_uart_wakeup (int uart_num );
496507
0 commit comments