Allow HASP_USE_GPIO37 and HASP_USE_GPIO38 to enable GPIO37 and 38 on some boards #453

This commit is contained in:
fvanroie 2023-04-14 02:37:57 +02:00
parent 8148bbc988
commit a99cc4ec53

View File

@ -378,7 +378,12 @@ bool Esp32Device::is_system_pin(uint8_t pin)
if((pin >= 33) && (pin <= 37)) return true; // octal flash or PSram if((pin >= 33) && (pin <= 37)) return true; // octal flash or PSram
#else #else
if((pin >= 6) && (pin <= 11)) return true; // integrated SPI flash if((pin >= 6) && (pin <= 11)) return true; // integrated SPI flash
if((pin == 37) || (pin == 38)) return true; // unavailable #ifndef HASP_USE_GPIO37
if(pin == 37) return true; // unavailable
#endif
#ifndef HASP_USE_GPIO38
if(pin == 38) return true; // unavailable
#endif
if(psramFound() && ((pin == 16) || (pin == 17))) return true; // PSRAM if(psramFound() && ((pin == 16) || (pin == 17))) return true; // PSRAM
#endif #endif
@ -442,8 +447,9 @@ long Esp32Device::get_uptime()
#if defined(LANBONL8) #if defined(LANBONL8)
// #warning Building for Lanbon L8 // #warning Building for Lanbon L8
#include "dev/esp32/lanbonl8.h" #include "dev/esp32/lanbonl8.h"
#elif defined(M5STACK)
// #warning Building for M5Stack core2 #elif defined(M5STACK) || defined(M5STACKLGFX)
#warning Building for M5Stack core2
#include "dev/esp32/m5stackcore2.h" #include "dev/esp32/m5stackcore2.h"
#else #else
dev::Esp32Device haspDevice; dev::Esp32Device haspDevice;