Adafruit-GFX-Library icon indicating copy to clipboard operation
Adafruit-GFX-Library copied to clipboard

Faster `writePixels` for ESP8266 with hardware SPI

Open johnboiles opened this issue 4 years ago • 0 comments

Similar to what is done for ESP32 and NRF52 chips, use the builtin multi-byte methods for writing pixels over SPI. When reviewing the change, it may be helpful to look at the ESP32 version (immediately above) and the NRF52 version (immediately below)

Unfortunately, there's not a little-endian method in the ESP8266 libs for sending bytes (like hwspi._spi->writePixels for ESP32) so instead we need to do in-place byte swaps (similar to what is done for the NRF52 chip).

Even with the byteSwap this is significantly faster than SPI_WRITE16 in a loop.

johnboiles avatar Nov 06 '21 04:11 johnboiles