From a39a596b791f14e277ba526f9b6bd8ce2da36550 Mon Sep 17 00:00:00 2001 From: Seon Rozenblum Date: Mon, 20 Sep 2021 11:03:38 +1000 Subject: [PATCH] esp32/machine_pin: Block out IO16 and IO17 when using SPIRAM on ESP32. Fixes issue #7819. --- ports/esp32/machine_pin.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ports/esp32/machine_pin.c b/ports/esp32/machine_pin.c index 6c1e96879f..bf61122811 100644 --- a/ports/esp32/machine_pin.c +++ b/ports/esp32/machine_pin.c @@ -84,8 +84,13 @@ STATIC const machine_pin_obj_t machine_pin_obj[] = { {{&machine_pin_type}, GPIO_NUM_13}, {{&machine_pin_type}, GPIO_NUM_14}, {{&machine_pin_type}, GPIO_NUM_15}, + #if CONFIG_ESP32_SPIRAM_SUPPORT + {{NULL}, -1}, + {{NULL}, -1}, + #else {{&machine_pin_type}, GPIO_NUM_16}, {{&machine_pin_type}, GPIO_NUM_17}, + #endif {{&machine_pin_type}, GPIO_NUM_18}, {{&machine_pin_type}, GPIO_NUM_19}, {{NULL}, -1}, @@ -518,8 +523,13 @@ STATIC const machine_pin_irq_obj_t machine_pin_irq_object[] = { {{&machine_pin_irq_type}, GPIO_NUM_13}, {{&machine_pin_irq_type}, GPIO_NUM_14}, {{&machine_pin_irq_type}, GPIO_NUM_15}, + #if CONFIG_ESP32_SPIRAM_SUPPORT + {{NULL}, -1}, + {{NULL}, -1}, + #else {{&machine_pin_irq_type}, GPIO_NUM_16}, {{&machine_pin_irq_type}, GPIO_NUM_17}, + #endif {{&machine_pin_irq_type}, GPIO_NUM_18}, {{&machine_pin_irq_type}, GPIO_NUM_19}, {{NULL}, -1},