Kaynağa Gözat

Add fail-closed profiles for Freenove and ESP32-S3 Ethernet boards

SybexXx 3 gün önce
ebeveyn
işleme
530041d9fa

+ 56 - 0
code/components/jomjol_controlGPIO/board_gpio_profile.cpp

@@ -52,6 +52,62 @@ static const GpioBoardProfile kBoardProfile = {
     GPIO_MAX_USER_CHANNELS
 };
 
+#elif defined(BOARD_FREENOVE_ESP32S3)
+
+/*
+ * Freenove ESP32-S3-CAM mapping supplied for audit:
+ * camera, SDMMC, UART and on-board LEDs are reserved. GPIO21 is assigned
+ * to the legacy generic GPIO handler, but no carrier schematic or complete
+ * peripheral audit was supplied to prove it is user-safe. Fail closed.
+ */
+static const gpio_num_t kReservedPins[] = {
+    GPIO_NUM_0, GPIO_NUM_3, GPIO_NUM_4, GPIO_NUM_5, GPIO_NUM_6, GPIO_NUM_7,
+    GPIO_NUM_8, GPIO_NUM_9, GPIO_NUM_10, GPIO_NUM_11, GPIO_NUM_12,
+    GPIO_NUM_13, GPIO_NUM_14, GPIO_NUM_15, GPIO_NUM_16, GPIO_NUM_17,
+    GPIO_NUM_18, GPIO_NUM_19, GPIO_NUM_20, GPIO_NUM_26, GPIO_NUM_27,
+    GPIO_NUM_28, GPIO_NUM_29, GPIO_NUM_30, GPIO_NUM_31, GPIO_NUM_32,
+    GPIO_NUM_33, GPIO_NUM_34, GPIO_NUM_35, GPIO_NUM_36, GPIO_NUM_37,
+    GPIO_NUM_38, GPIO_NUM_39, GPIO_NUM_40, GPIO_NUM_41, GPIO_NUM_43,
+    GPIO_NUM_44, GPIO_NUM_45, GPIO_NUM_46, GPIO_NUM_47, GPIO_NUM_48,
+    GPIO_NUM_2, GPIO_NUM_21
+};
+
+static const GpioBoardProfile kBoardProfile = {
+    "Freenove ESP32-S3-CAM (GPIO profile not yet audited)",
+    NULL, 0U,
+    kReservedPins, sizeof(kReservedPins) / sizeof(kReservedPins[0]),
+    GPIO_NUM_48,
+    GPIO_MAX_USER_CHANNELS
+};
+
+#elif defined(BOARD_ESP32_S3_ETH_V1) || defined(BOARD_ESP32_S3_ETH_V2)
+
+/*
+ * ESP32-S3-ETH V1/V2 mapping supplied for audit:
+ * camera, SDMMC, UART, W5500 and board LEDs are reserved. Legacy GPIO
+ * handler pins 33-36 are not whitelisted: module flash/PSRAM wiring must
+ * be confirmed for the exact module variant before any pin is released.
+ */
+static const gpio_num_t kReservedPins[] = {
+    GPIO_NUM_0, GPIO_NUM_3, GPIO_NUM_4, GPIO_NUM_5, GPIO_NUM_6, GPIO_NUM_7,
+    GPIO_NUM_8, GPIO_NUM_9, GPIO_NUM_10, GPIO_NUM_11, GPIO_NUM_12,
+    GPIO_NUM_13, GPIO_NUM_14, GPIO_NUM_15, GPIO_NUM_16, GPIO_NUM_17,
+    GPIO_NUM_18, GPIO_NUM_19, GPIO_NUM_20, GPIO_NUM_21, GPIO_NUM_26,
+    GPIO_NUM_27, GPIO_NUM_28, GPIO_NUM_29, GPIO_NUM_30, GPIO_NUM_31,
+    GPIO_NUM_32, GPIO_NUM_33, GPIO_NUM_34, GPIO_NUM_35, GPIO_NUM_36,
+    GPIO_NUM_37, GPIO_NUM_38, GPIO_NUM_39, GPIO_NUM_40, GPIO_NUM_41,
+    GPIO_NUM_42, GPIO_NUM_43, GPIO_NUM_44, GPIO_NUM_45, GPIO_NUM_46,
+    GPIO_NUM_47, GPIO_NUM_48, GPIO_NUM_1
+};
+
+static const GpioBoardProfile kBoardProfile = {
+    "ESP32-S3-ETH V1/V2 (GPIO profile not yet audited)",
+    NULL, 0U,
+    kReservedPins, sizeof(kReservedPins) / sizeof(kReservedPins[0]),
+    GPIO_NUM_NC,
+    GPIO_MAX_USER_CHANNELS
+};
+
 #elif defined(BOARD_WROVER_KIT)
 
 static const gpio_num_t kReservedPins[] = {