1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2025-01-03 03:50:58 +00:00

embed/extmod/modtrezorui: properly set backlight and bpp for T1 display

This commit is contained in:
Pavol Rusnak 2018-09-13 19:41:52 +02:00
parent 204f6b7a5a
commit fb816bd2de
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
2 changed files with 9 additions and 0 deletions

View File

@ -62,6 +62,12 @@ static struct {
} PIXELWINDOW;
void PIXELDATA(uint16_t c) {
#if TREZOR_MODEL == 1
// set to white if highest bits of all R, G, B values are set to 1
// bin(10000 100000 10000) = hex(0x8410)
// otherwise set to black
c = (c & 0x8410) ? 0xFFFF : 0x0000;
#endif
if (!RENDERER) {
display_init();
}

View File

@ -637,6 +637,9 @@ int display_orientation(int degrees)
int display_backlight(int val)
{
#if TREZOR_MODEL == 1
val = 255;
#endif
if (DISPLAY_BACKLIGHT != val && val >= 0 && val <= 255) {
DISPLAY_BACKLIGHT = val;
display_set_backlight(val);