Merge pull request #370 from johnboiles/patch-1

Faster `writePixels` for ESP8266 with hardware SPI
This commit is contained in:
Mikey Sklar authored and GitHub committed 2026-10-17 05:46:12 -07:00
commit a1b383586a
1 file changed
+11
+11
View File
@@ -1020,6 +1020,17 @@ void Adafruit_SPITFT::writePixels(uint16_t *colors, uint32_t len, bool block,
}
return;
}
#elif defined(ESP8266)
if (connection == TFT_HARD_SPI) {
if (!bigEndian) {
swapBytes(colors, len); // convert little-to-big endian for display
}
hwspi._spi->writeBytes((uint8_t *)colors, len * 2);
if (!bigEndian) {
swapBytes(colors, len); // big-to-little endian to restore pixel buffer
}
return;
}
#elif defined(ARDUINO_NRF52_ADAFRUIT) && \
defined(NRF52840_XXAA) // Adafruit nRF52 use SPIM3 DMA at 32Mhz
if (!bigEndian) {