lovyan03 / LovyanGFX

SPI LCD graphics library for ESP32 (ESP-IDF/ArduinoESP32) / ESP8266 (ArduinoESP8266) / SAMD51(Seeed ArduinoSAMD51)
Other
1.03k stars 189 forks source link

Add portduino platform, encode SPI device in spi_host #561

Closed jp-bennett closed 2 weeks ago

jp-bennett commented 2 weeks ago

@mverch and I hashed out the SPI device problem, and what we came up with was a scheme to encode the SPI bus as the lower 4 bits of spi_host, and the device as the upper 4 bits. The change on the Portduino side was to make sure that multiple HardwareSPI objects could be created, and safely point to the same device.

jp-bennett commented 2 weeks ago

Much simpler, moved the gnarly bits down into the Portduino layer. Also unified the approach between the touch and panel SPI layers.

mverch67 commented 2 weeks ago

Looks better now :)

jp-bennett commented 2 weeks ago

@tobozo what do we think about this approach?

tobozo commented 2 weeks ago

@jp-bennett much lighter, less is more :+1:
@mverch67 thanks for helping with the review :heart: