Skip to main content

esp_sleep_enable_uart_wakeup

Function esp_sleep_enable_uart_wakeup 

Source
pub unsafe extern "C" fn esp_sleep_enable_uart_wakeup(
    uart_num: c_int,
) -> esp_err_t
Expand description

@brief Enable wakeup from light sleep using UART

Use uart_set_wakeup_threshold function to configure UART wakeup threshold.

Wakeup from light sleep takes some time, so not every character sent to the UART can be received by the application.

@note 1. ESP32 does not support wakeup from UART2. 2. If PM_POWER_DOWN_PERIPHERAL_IN_LIGHT_SLEEP is enabled (if target supported), this API is unavailable since the UART module is powered down during sleep.

@param uart_num UART port to wake up from @return - ESP_OK on success - ESP_ERR_INVALID_ARG if wakeup from given UART is not supported