mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 11:10:54 +03:00
fix(gpio): fix ESP32 GPIO sleep mode handling
The previous workaround does not work, the backup/restore should apply to RTC IO registers.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
#include "soc/rtc_periph.h"
|
||||
#include "soc/rtc_io_reg.h"
|
||||
|
||||
const int rtc_io_num_map[SOC_GPIO_PIN_COUNT] = {
|
||||
const int8_t rtc_io_num_map[SOC_GPIO_PIN_COUNT] = {
|
||||
RTCIO_GPIO0_CHANNEL, //GPIO0
|
||||
-1,//GPIO1
|
||||
RTCIO_GPIO2_CHANNEL, //GPIO2
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#include "soc/rtc_io_periph.h"
|
||||
|
||||
const int rtc_io_num_map[SOC_GPIO_PIN_COUNT] = {
|
||||
const int8_t rtc_io_num_map[SOC_GPIO_PIN_COUNT] = {
|
||||
RTCIO_GPIO0_CHANNEL, //GPIO0
|
||||
RTCIO_GPIO1_CHANNEL, //GPIO1
|
||||
RTCIO_GPIO2_CHANNEL, //GPIO2
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
#include "soc/rtc_io_periph.h"
|
||||
|
||||
const int rtc_io_num_map[SOC_GPIO_PIN_COUNT] = {
|
||||
const int8_t rtc_io_num_map[SOC_GPIO_PIN_COUNT] = {
|
||||
-1,//GPIO0
|
||||
-1,//GPIO1
|
||||
-1,//GPIO2
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#include "soc/rtc_periph.h"
|
||||
|
||||
const int rtc_io_num_map[SOC_GPIO_PIN_COUNT] = {
|
||||
const int8_t rtc_io_num_map[SOC_GPIO_PIN_COUNT] = {
|
||||
RTCIO_GPIO0_CHANNEL, //GPIO0
|
||||
RTCIO_GPIO1_CHANNEL, //GPIO1
|
||||
RTCIO_GPIO2_CHANNEL, //GPIO2
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "soc/rtc_periph.h"
|
||||
#include "soc/rtc_io_reg.h"
|
||||
|
||||
const int rtc_io_num_map[SOC_GPIO_PIN_COUNT] = {
|
||||
const int8_t rtc_io_num_map[SOC_GPIO_PIN_COUNT] = {
|
||||
RTCIO_GPIO0_CHANNEL, //GPIO0
|
||||
RTCIO_GPIO1_CHANNEL, //GPIO1
|
||||
RTCIO_GPIO2_CHANNEL, //GPIO2
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "soc/rtc_periph.h"
|
||||
#include "soc/rtc_io_reg.h"
|
||||
|
||||
const int rtc_io_num_map[SOC_GPIO_PIN_COUNT] = {
|
||||
const int8_t rtc_io_num_map[SOC_GPIO_PIN_COUNT] = {
|
||||
RTCIO_GPIO0_CHANNEL, //GPIO0
|
||||
RTCIO_GPIO1_CHANNEL, //GPIO1
|
||||
RTCIO_GPIO2_CHANNEL, //GPIO2
|
||||
|
||||
@@ -62,7 +62,7 @@ extern const rtc_io_desc_t rtc_io_desc[SOC_RTCIO_PIN_COUNT];
|
||||
* This is an internal function of the driver, and is not usually useful
|
||||
* for external use.
|
||||
*/
|
||||
extern const int rtc_io_num_map[SOC_GPIO_PIN_COUNT];
|
||||
extern const int8_t rtc_io_num_map[SOC_GPIO_PIN_COUNT];
|
||||
#endif //SOC_RTCIO_PIN_COUNT > 0
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
Reference in New Issue
Block a user