|
|
@@ -224,6 +224,24 @@ esp_err_t rtc_gpio_hold_en(gpio_num_t gpio_num);
|
|
|
*/
|
|
|
esp_err_t rtc_gpio_hold_dis(gpio_num_t gpio_num);
|
|
|
|
|
|
+/**
|
|
|
+ * @brief Helper function to disconnect internal circuits from an RTC IO
|
|
|
+ * This function disables input, output, pullup, pulldown, and enables
|
|
|
+ * hold feature for an RTC IO.
|
|
|
+ * Use this function if an RTC IO needs to be disconnected from internal
|
|
|
+ * circuits in deep sleep, to minimize leakage current.
|
|
|
+ *
|
|
|
+ * In particular, for ESP32-WROVER module, call
|
|
|
+ * rtc_gpio_isolate(GPIO_NUM_12) before entering deep sleep, to reduce
|
|
|
+ * deep sleep current.
|
|
|
+ *
|
|
|
+ * @param gpio_num GPIO number (e.g. GPIO_NUM_12).
|
|
|
+ * @return
|
|
|
+ * - ESP_OK on success
|
|
|
+ * - ESP_ERR_INVALID_ARG if GPIO is not an RTC IO
|
|
|
+ */
|
|
|
+esp_err_t rtc_gpio_isolate(gpio_num_t gpio_num);
|
|
|
+
|
|
|
/**
|
|
|
* @brief Disable force hold signal for all RTC IOs
|
|
|
*
|