summaryrefslogtreecommitdiff
path: root/ports/esp32/machine_pin.c
diff options
context:
space:
mode:
authorTomas Vanek <vanekt@fbl.cz>2021-05-20 19:15:52 +0200
committerDamien George <damien@micropython.org>2021-12-15 15:48:46 +1100
commitf9733705a907a9e9c3b3e6ab613cc1d7f63b51a6 (patch)
tree08a4e7efe9422dbafe4d364f523c7334d37180b5 /ports/esp32/machine_pin.c
parente9f880482cbe21002e9568aa82893b2b98956a56 (diff)
esp32/machine_pin: Make GPIO 26 usable for S2,S3 if SPIRAM not config'd.
Signed-off-by: Tomas Vanek <vanekt@fbl.cz>
Diffstat (limited to 'ports/esp32/machine_pin.c')
-rw-r--r--ports/esp32/machine_pin.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/ports/esp32/machine_pin.c b/ports/esp32/machine_pin.c
index 42c419426..c0c7ddb70 100644
--- a/ports/esp32/machine_pin.c
+++ b/ports/esp32/machine_pin.c
@@ -177,7 +177,11 @@ STATIC const machine_pin_obj_t machine_pin_obj[] = {
{{NULL}, -1}, // 23 not a pin
{{NULL}, -1}, // 24 not a pin
{{NULL}, -1}, // 25 not a pin
- {{NULL}, -1}, // 26 FLASH/PSRAM
+ #if CONFIG_SPIRAM
+ {{NULL}, -1}, // 26 PSRAM
+ #else
+ {{&machine_pin_type}, GPIO_NUM_26},
+ #endif
{{NULL}, -1}, // 27 FLASH/PSRAM
{{NULL}, -1}, // 28 FLASH/PSRAM
{{NULL}, -1}, // 29 FLASH/PSRAM
@@ -618,7 +622,11 @@ STATIC const machine_pin_irq_obj_t machine_pin_irq_object[] = {
{{NULL}, -1}, // 23 not a pin
{{NULL}, -1}, // 24 not a pin
{{NULL}, -1}, // 25 not a pin
- {{NULL}, -1}, // 26 FLASH/PSRAM
+ #if CONFIG_SPIRAM
+ {{NULL}, -1}, // 26 PSRAM
+ #else
+ {{&machine_pin_irq_type}, GPIO_NUM_26},
+ #endif
{{NULL}, -1}, // 27 FLASH/PSRAM
{{NULL}, -1}, // 28 FLASH/PSRAM
{{NULL}, -1}, // 29 FLASH/PSRAM