mirror of
https://github.com/adafruit/Adafruit-GFX-Library.git
synced 2026-10-26 22:10:52 +00:00
Merge pull request #370 from johnboiles/patch-1
Faster `writePixels` for ESP8266 with hardware SPI
This commit is contained in:
1 file changed
+11
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user