Merge pull request #521 from mikeysklar/esp8266-softspi-wdt

Stop ESP8266 resets during long software SPI fills
This commit is contained in:
Mikey Sklar authored and GitHub committed 2026-10-18 05:41:53 -07:00
commit 7c2dac7953
1 file changed
+2 -2
+2 -2
View File
@@ -1444,8 +1444,8 @@ void Adafruit_SPITFT::writeColor(uint16_t color, uint32_t len) {
#if defined(ESP8266)
do {
uint32_t pixelsThisPass = len;
if (pixelsThisPass > 20000)
pixelsThisPass = 20000;
if (pixelsThisPass > 5000) // About 0.4 s, well under the soft WDT
pixelsThisPass = 5000;
len -= pixelsThisPass;
optimistic_yield(10000); // Yield if 10 ms since last yield
while (pixelsThisPass--) {