st7789: allow changing the color format using COLMOD

This is only really useful for applications that use DrawRGBBitmap8. The
RGB444 format has fewer colors, but can be up to 25% faster than the
default RGB565.

I have tested this change on the Gopher Badge and the PineTime. Both can
be substantially faster once the code is modified to output RGB444
instead of RGB565.
This commit is contained in:
Ayke van Laethem
2023-05-09 12:10:52 +02:00
committed by Ron Evans
parent f627fd162d
commit 42e4d29157
2 changed files with 27 additions and 1 deletions
+4
View File
@@ -55,6 +55,10 @@ const (
VSCRDEF = 0x33
VSCRSADD = 0x37
ColorRGB444 ColorFormat = 0b011
ColorRGB565 ColorFormat = 0b101
ColorRGB666 ColorFormat = 0b111
NO_ROTATION = drivers.Rotation0
ROTATION_90 = drivers.Rotation90 // 90 degrees clock-wise rotation
ROTATION_180 = drivers.Rotation180