Adafruit-GFX-Library
Adafruit-GFX-Library copied to clipboard
Add yield hook as a weak definition.
We could leave the yield()
behavior customizable to handle edge cases like #285. Most ESP8266 users need to call yield()
inside expensive drawing operations to keep the watchdog from firing. However, some sophisticated users who are using a different scheduling regime like Ticker must not call yield()
, so we provide an opt-out.
I like the weak symbol for this, over other hook techniques, because the linker can remove the replaced symbol, there's no init-order race, and it doesn't bring any of this drama into the header. :)
Fixes #285