mirror of
https://github.com/adafruit/Adafruit-GFX-Library.git
synced 2026-10-26 22:10:52 +00:00
Merge pull request #521 from mikeysklar/esp8266-softspi-wdt
Stop ESP8266 resets during long software SPI fills
This commit is contained in:
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