1 /* 2 * SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #pragma once 8 9 #include "sdkconfig.h" 10 #include <esp_types.h> 11 12 #include "soc/soc_caps.h" 13 #include "driver/gpio.h" 14 15 #if CONFIG_GPIO_ESP32_SUPPORT_SWITCH_SLP_PULL 16 /** 17 * @brief Emulate ESP32S2 behaviour to backup FUN_PU, FUN_PD information 18 * 19 * @note Need to be called before sleep. 20 * 21 * @return 22 * - ESP_OK Success 23 */ 24 esp_err_t gpio_sleep_pupd_config_apply(gpio_num_t gpio_num); 25 26 /** 27 * @brief Emulate ESP32S2 behaviour to restore FUN_PU, FUN_PD information 28 * 29 * @note Need to be called after sleep. 30 * 31 * @return 32 * - ESP_OK Success 33 */ 34 esp_err_t gpio_sleep_pupd_config_unapply(gpio_num_t gpio_num); 35 #endif 36