diff --git a/components/driver/include/driver/gpio.h b/components/driver/include/driver/gpio.h index aac81566fc..5112825f8b 100644 --- a/components/driver/include/driver/gpio.h +++ b/components/driver/include/driver/gpio.h @@ -35,6 +35,8 @@ #include "esp32s3/rom/gpio.h" #elif CONFIG_IDF_TARGET_ESP32C3 #include "esp32c3/rom/gpio.h" +#elif CONFIG_IDF_TARGET_ESP32S3 +#include "esp32s3/rom/gpio.h" #endif #ifdef CONFIG_LEGACY_INCLUDE_COMMON_HEADERS diff --git a/components/driver/test/test_gpio.c b/components/driver/test/test_gpio.c index 792421838b..6bf6a8623d 100644 --- a/components/driver/test/test_gpio.c +++ b/components/driver/test/test_gpio.c @@ -39,7 +39,7 @@ #define TEST_GPIO_EXT_IN_IO 20 // default input GPIO #define TEST_GPIO_OUTPUT_PIN 12 #define TEST_GPIO_INPUT_ONLY_PIN 46 -#define TEST_GPIO_OUTPUT_MAX GPIO_NUM_47 +#define TEST_GPIO_OUTPUT_MAX GPIO_NUM_MAX #elif CONFIG_IDF_TARGET_ESP32C3 #define TEST_GPIO_EXT_OUT_IO 2 // default output GPIO #define TEST_GPIO_EXT_IN_IO 3 // default input GPIO @@ -166,7 +166,7 @@ static void drive_capability_set_get(gpio_num_t num, gpio_drive_cap_t capability TEST_CASE("GPIO config parameters test", "[gpio]") { //error param test - //ESP32 test 41 bit, ESP32-S2 test 48 bit + //ESP32 test 41 bit, ESP32-S2 test 48 bit, ESP32-S3 test 49 bit gpio_config_t io_config = { 0 }; io_config.intr_type = GPIO_INTR_DISABLE; io_config.pin_bit_mask = ((uint64_t)1<<(GPIO_NUM_MAX+1)); @@ -176,7 +176,7 @@ TEST_CASE("GPIO config parameters test", "[gpio]") io_config.pin_bit_mask = 0; TEST_ASSERT(gpio_config(&io_config) == ESP_ERR_INVALID_ARG); - //ESP32 test 40 bit, ESP32-S2 test 47 bit + //ESP32 test 40 bit, ESP32-S2 test 47 bit, ESP32-S3 test 48 bit io_config.pin_bit_mask = ((uint64_t)1<