Check for custom used pins

This commit is contained in:
fvanroie 2021-10-09 01:03:00 +02:00
parent 91835d3684
commit 917fe508b3
3 changed files with 8 additions and 2 deletions

View File

@ -802,6 +802,12 @@ bool gpioIsSystemPin(uint8_t gpio)
#endif
#endif
if(haspDevice.is_system_pin(gpio)) return true;
#if defined(HASP_USE_CUSTOM)
if(custom_pin_in_use(gpio)) return true;
#endif
return false;
}

View File

@ -1549,7 +1549,7 @@ void webHandleGpioConfig()
for(uint8_t gpio = 0; gpio < NUM_DIGITAL_PINS; gpio++) {
for(uint8_t id = 0; id < HASP_NUM_GPIO_CONFIG; id++) {
hasp_gpio_config_t conf = gpioGetPinConfig(id);
if((conf.pin == gpio) && gpioConfigInUse(id) && gpioInUse(gpio) && !gpioIsSystemPin(gpio)) {
if((conf.pin == gpio) && gpioConfigInUse(id) && !gpioIsSystemPin(gpio)) {
httpMessage += F("<tr><td>");
// httpMessage += halGpioName(gpio);
httpMessage += haspDevice.gpio_name(gpio).c_str();

View File

@ -20,7 +20,7 @@ build_flags =
${touch.xpt2046}
${esp32.vspi} ; Use VSPI hardware SPI bus
-D TFT_DC=4
-D TFT_CS=5
-D TFT_CS=5
-D TFT_RST=22 ; RST
-D TFT_BCKL=15
-D TOUCH_CS=14