Adafruit-GFX-Library
Adafruit-GFX-Library copied to clipboard
Faster `writePixels` for ESP8266 with hardware SPI
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.