2020-06-18 05:13:19 -04:00
|
|
|
// Copyright 2015-2020 Espressif Systems (Shanghai) PTE LTD
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
// you may not use this file except in compliance with the License.
|
|
|
|
// You may obtain a copy of the License at
|
|
|
|
//
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
//
|
|
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
// See the License for the specific language governing permissions and
|
|
|
|
// limitations under the License.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// ESP32-S3 has 1 GPIO peripheral
|
|
|
|
#define SOC_GPIO_PORT (1)
|
2020-09-09 22:37:58 -04:00
|
|
|
#define SOC_GPIO_PIN_COUNT (48)
|
2020-06-18 05:13:19 -04:00
|
|
|
|
|
|
|
// On ESP32-S3, Digital IOs have their own registers to control pullup/down/capability, independent with RTC registers.
|
2020-09-09 22:37:58 -04:00
|
|
|
#define SOC_GPIO_SUPPORT_RTC_INDEPENDENT (1)
|
2020-06-18 05:13:19 -04:00
|
|
|
// Force hold is a new function of ESP32-S3
|
2020-09-09 22:37:58 -04:00
|
|
|
#define SOC_GPIO_SUPPORT_FORCE_HOLD (1)
|
2020-06-18 05:13:19 -04:00
|
|
|
|
2020-12-16 04:03:48 -05:00
|
|
|
// 0~47 except from 22~25 are valid
|
2021-05-06 04:20:54 -04:00
|
|
|
#define SOC_GPIO_VALID_GPIO_MASK (0xFFFFFFFFFFFFULL & ~(0ULL | BIT22 | BIT23 | BIT24 | BIT25))
|
2020-12-16 04:03:48 -05:00
|
|
|
// GPIO 46 is input only
|
2021-05-06 04:20:54 -04:00
|
|
|
#define SOC_GPIO_VALID_OUTPUT_GPIO_MASK (SOC_GPIO_VALID_GPIO_MASK & ~(0ULL | BIT46))
|
2020-06-18 05:13:19 -04:00
|
|
|
|
2020-07-31 06:26:07 -04:00
|
|
|
|
2020-06-18 05:13:19 -04:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|