From 230d98be35d039ec777272a851276b5e91048e86 Mon Sep 17 00:00:00 2001 From: Timo Witte Date: Fri, 28 Jun 2024 23:41:24 +0200 Subject: [PATCH] add custom portmap for ESP32C6 --- lib/i2cscan/i2cscan.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/i2cscan/i2cscan.cpp b/lib/i2cscan/i2cscan.cpp index 2422ef065..345c54fbc 100644 --- a/lib/i2cscan/i2cscan.cpp +++ b/lib/i2cscan/i2cscan.cpp @@ -6,10 +6,15 @@ uint8_t portArray[] = {16, 5, 4, 2, 14, 12, 13}; uint8_t portExclude[] = {LED_PIN}; String portMap[] = {"D0", "D1", "D2", "D4", "D5", "D6", "D7"}; // ESP32C3 has not as many ports as the ESP32 -#elif defined(ESP32C3) || defined(ESP32C6) +#elif defined(ESP32C3) uint8_t portArray[] = {2, 3, 4, 5, 6, 7, 8, 9, 10}; uint8_t portExclude[] = {18, 19, 20, 21, LED_PIN}; String portMap[] = {"2", "3", "4", "5", "6", "7", "8", "9", "10"}; +// this is for the ESP32C6 has a lot of pins (10/11 only availiable on the WROOM modules but not on the "mini") +#elif defined(ESP32C6) +uint8_t portArray[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 14, 15, 18, 19, 20, 21, 22, 23}; +String portMap[] = {"0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "14", "15", "18", "19", "20", "21", "22", "23"}; +uint8_t portExclude[] = {12, 13, 16, 17, LED_PIN}; // exclude USB D+,D- and serial TX/RX #elif defined(ESP32) uint8_t portArray[] = {4, 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, 25, 26, 27, 32, 33}; String portMap[] = {"4", "13", "14", "15", "16", "17", "18", "19", "21", "22", "23", "25", "26", "27", "32", "33"};