micropython-nano-gui/drivers
Carl Pottle f6c3cf29bb Optimize ili9488 driver
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.
2025-04-17 11:03:41 -07:00
..
epaper pico_epaper_42_v2 drivers: Add code comments re long term use. 2024-10-25 17:24:19 +01:00
gc9a01 Display drivers: add short_lock facility. 2024-10-08 16:10:57 +01:00
ili93xx ILI9341 drivers: add mod constructor arg. 2025-01-26 12:31:29 +00:00
ili94xx Optimize ili9488 driver 2025-04-17 11:03:41 -07:00
sh1106 Fix package.json files for CPython. 2023-08-29 10:03:55 +01:00
sharp Fix package.json files for CPython. 2023-08-29 10:03:55 +01:00
ssd1306 Fix package.json files for CPython. 2023-08-29 10:03:55 +01:00
ssd1327 Fix package.json files for CPython. 2023-08-29 10:03:55 +01:00
ssd1331 Fix package.json files for CPython. 2023-08-29 10:03:55 +01:00
ssd1351 Fix package.json files for CPython. 2023-08-29 10:03:55 +01:00
st7567s Document user contributed drivers. 2023-09-02 11:21:21 +01:00
st7735r Fix package.json files for CPython. 2023-08-29 10:03:55 +01:00
st7789 st7789 drivers: provide default rst arg. 2025-04-15 17:04:56 +01:00
boolpalette.py PR7682 improvements: drivers, writer.py, docs. 2021-08-29 11:50:03 +01:00