Don’t use DMA on very short pixel runs

This commit is contained in:
Phillip Burgess 2019-03-18 22:04:36 -07:00
parent 4c7192b197
commit 5f38af166f

View File

@ -1005,7 +1005,8 @@ void Adafruit_SPITFT::writeColor(uint16_t color, uint32_t len) {
}
#else // !ESP32
#if defined(USE_SPI_DMA)
if((connection == TFT_HARD_SPI) || (connection == TFT_PARALLEL)) {
if(((connection == TFT_HARD_SPI) || (connection == TFT_PARALLEL)) &&
(len >= 16)) { // DMA setup takes longer on short pixel runs
int i, d, numDescriptors;
if(hi == lo) { // If high & low bytes are same...
onePixelBuf = color;