adafruit / Adafruit_LvGL_Glue

“Glue” library between LittlevGL and Adafruit GFX (SPITFT)
Other
35 stars 14 forks source link

Feature Request: Support for non-standard SPI pins on ESP32 devices #24

Open ScruffR opened 11 months ago

ScruffR commented 11 months ago

Since the ESP32 series offer very high pin flexibility to shuffle pins when needed it would be rather nice if we could use HW SPI interfaces VSPI and HSPI with non-standard pins in Adafruit_SPITFT.

With some code like this

SPIClass spi(HSPI);
Adafruit_HX8357 tft(&spi, CS_PIN, CD_PIN, RST_PIN);

void setup() {
  spi.begin(CLK_PIN, MISO_PIN, MOSI_PIN, CS_PIN);
  tft.begin();
  ...
}

Maybe be adding an overload for ::begin() that wouldn't attempt to call SPIClass::begin() internally.

brentru commented 11 months ago

@ScruffR Into it! Are you interested in adding this enhancement to this library?

ScruffR commented 11 months ago

I would be and I have tried some modifications, but haven't found a solution nor a good explanation why what I tried didn't work as expected. Once I do find a solution, I'd file a PR.