Skip to content

fix: gpio_input_get() fails to compile in Arduino-ESP32 parallel mode; replace with REG_READ(GPIO_IN_REG)#3909

Open
skele6011 wants to merge 1 commit intoBodmer:masterfrom
skele6011:fix/esp32-gpio-input-get-parallel
Open

fix: gpio_input_get() fails to compile in Arduino-ESP32 parallel mode; replace with REG_READ(GPIO_IN_REG)#3909
skele6011 wants to merge 1 commit intoBodmer:masterfrom
skele6011:fix/esp32-gpio-input-get-parallel

Conversation

@skele6011
Copy link
Copy Markdown

@skele6011 skele6011 commented Apr 5, 2026

Problem

In Arduino-ESP32 environments, gpio_input_get() used in readByte()
fails to compile when using 8-bit parallel mode (TFT_PARALLEL_8_BIT).
This is due to the Arduino-ESP32 core not cleanly exposing every IDF
function. This means gpio_input_get() is not properly resolved in the Arduino
build chain, causing a compile error.

Fix

Replace all three calls to gpio_input_get() with REG_READ(GPIO_IN_REG),
which reads the GPIO input register directly at the hardware level with
no dependency on the IDF abstraction layer.

The logic is identical, three reads to allow for bus access time — only
the mechanism changes.

Environment Tested

  • ESP32-D (DevKit)
  • Arduino-ESP32 core
  • Arduino IDE
  • 8-bit parallel display (ILI9486, 3.5" TFT)

Notes

The library does not compile at all without this fix in the above environment. REG_READ(GPIO_IN_REG) is the correct low-level equivalent and works reliably.
This fixes issues like the ones here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant