kopia lustrzana https://github.com/peterhinch/micropython-nano-gui
![]() I implemented several code optimizations from a presentation by Damien George I found on youtube. The optimizations are on a slide here: https://youtu.be/hHec4qL00x0?t=813 1) Change __init__ to use bit 5 in madctl register to swap row/column for landscape mode. 2) Eliminate functions _lscopy and _lscopy_gs. They are not needed because the ili9488 chip is handling orientation. Results in simplification in show() and do_refresh(). 3) Minor optimizations to _lcopy and _lcopy_gs. Reverse order processing bytes. Specific changes: - change while condition from 'x < length' to simply 'length'. This test is faster in viper. - use length as index into source instead of x. Variable x is removed. This requires the source and dest to be processed from end to beginning. - other optimizations from the Pycon talk given by Damien George. 4) Optimizations to show() and do_refresh(). - Caching in local variables - Changes to support writing more pixels for each call to spi.write(). Saving from this are larger on ESP32 than on Pico and Pico 2. The Damien George optimizations save 10 to 20 milliseconds per screen refresh on my ESP32. I expect similar results for Pico and Pico2. The saving from fewer calls to spi.write() is significant on my ESP32. 60 to 80 milliseconds. The saving on Pico and Pico2 are smaller, 10 to 20 milliseconds. |
||
---|---|---|
.. | ||
epaper | ||
gc9a01 | ||
ili93xx | ||
ili94xx | ||
sh1106 | ||
sharp | ||
ssd1306 | ||
ssd1327 | ||
ssd1331 | ||
ssd1351 | ||
st7567s | ||
st7735r | ||
st7789 | ||
boolpalette.py |