mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-02 22:51:14 +00:00
fix(gpio): fix ESP32 GPIO sleep mode handling
The previous workaround does not work, the backup/restore should apply to RTC IO registers. Also moved the workaround to sleep_gpio.c to avoid gpio hal using kconfig.
This commit is contained in:
@@ -6,7 +6,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "sdkconfig.h"
|
||||
#include "esp_types.h"
|
||||
#include "soc/soc_caps.h"
|
||||
#include "soc/io_mux_reg.h"
|
||||
@@ -16,30 +15,6 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#if CONFIG_GPIO_ESP32_SUPPORT_SWITCH_SLP_PULL
|
||||
/**
|
||||
* @brief Emulate ESP32S2 behaviour to backup FUN_PU, FUN_PD information
|
||||
*
|
||||
* @note Need to be called before sleep.
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK Success
|
||||
* - ESP_ERR_INVALID_ARG GPIO number error
|
||||
*/
|
||||
esp_err_t gpio_sleep_pupd_config_apply(gpio_num_t gpio_num);
|
||||
|
||||
/**
|
||||
* @brief Emulate ESP32S2 behaviour to restore FUN_PU, FUN_PD information
|
||||
*
|
||||
* @note Need to be called after sleep.
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK Success
|
||||
* - ESP_ERR_INVALID_ARG GPIO number error
|
||||
*/
|
||||
esp_err_t gpio_sleep_pupd_config_unapply(gpio_num_t gpio_num);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Configure a pin to perform GPIO function or an IOMUX function
|
||||
*
|
||||
|
Reference in New Issue
Block a user