mirror of
https://github.com/adafruit/Adafruit-GFX-Library.git
synced 2026-10-26 22:10:52 +00:00
ESP8266: shorter soft SPI fill passes to avoid soft WDT reset
Each 20000-pixel pass took about 1.65 s with no yield on a 3.5" HX8357, which tripped the soft watchdog. 5000 pixels is about 0.4 s. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
0e844ad645
commit
b36a1f0e2e
1 file changed
+2
-2
+2
-2
@@ -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--) {
|
||||
|
||||
Reference in new issue
Block a user