gpio.h 756 B

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