[][src]Function esp_idf_sys::esp_sleep_enable_ext1_wakeup

pub unsafe extern "C" fn esp_sleep_enable_ext1_wakeup(
    mask: u64,
    mode: esp_sleep_ext1_wakeup_mode_t
) -> esp_err_t

@brief Enable wakeup using multiple pins

This function uses external wakeup feature of RTC controller. It will work even if RTC peripherals are shut down during sleep.

This feature can monitor any number of pins which are in RTC IOs. Once any of the selected pins goes into the state given by mode argument, the chip will be woken up.

@note This function does not modify pin configuration. The pins are configured in esp_sleep_start, immediately before entering sleep mode.

@note internal pullups and pulldowns don't work when RTC peripherals are shut down. In this case, external resistors need to be added. Alternatively, RTC peripherals (and pullups/pulldowns) may be kept enabled using esp_sleep_pd_config function.

@param mask bit mask of GPIO numbers which will cause wakeup. Only GPIOs which are have RTC functionality can be used in this bit map: 0,2,4,12-15,25-27,32-39. @param mode select logic function used to determine wakeup condition: - ESP_EXT1_WAKEUP_ALL_LOW: wake up when all selected GPIOs are low - ESP_EXT1_WAKEUP_ANY_HIGH: wake up when any of the selected GPIOs is high @return - ESP_OK on success - ESP_ERR_INVALID_ARG if any of the selected GPIOs is not an RTC GPIO, or mode is invalid