From 3b80e9f228ea6ec8d439579fc8d11af8fcedacaa Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Thu, 18 Feb 2021 11:56:32 +0100 Subject: [PATCH] fix(legacy): store only half of the logo64, use flip to render both parts --- legacy/bootloader/bootloader.c | 6 ++++-- legacy/demo/demo.c | 3 ++- legacy/firmware/layout2.c | 3 ++- legacy/firmware/trezor.c | 3 ++- legacy/gen/bitmaps.c | 8 ++++---- legacy/gen/bitmaps.h | 4 ++-- legacy/gen/bitmaps/logo64.png | Bin 339 -> 0 bytes legacy/gen/bitmaps/logo64_empty.png | Bin 311 -> 0 bytes legacy/gen/bitmaps/logo64_empty_half.png | Bin 0 -> 6730 bytes legacy/gen/bitmaps/logo64_half.png | Bin 0 -> 6391 bytes legacy/oled.c | 13 +++++++++++++ legacy/oled.h | 1 + 12 files changed, 30 insertions(+), 11 deletions(-) delete mode 100644 legacy/gen/bitmaps/logo64.png delete mode 100644 legacy/gen/bitmaps/logo64_empty.png create mode 100644 legacy/gen/bitmaps/logo64_empty_half.png create mode 100644 legacy/gen/bitmaps/logo64_half.png diff --git a/legacy/bootloader/bootloader.c b/legacy/bootloader/bootloader.c index e46c260cd2..37785c9e9c 100644 --- a/legacy/bootloader/bootloader.c +++ b/legacy/bootloader/bootloader.c @@ -93,7 +93,8 @@ static void __attribute__((noreturn)) load_app(int signed_firmware) { static void bootloader_loop(void) { oledClear(); - oledDrawBitmap(0, 0, &bmp_logo64); + oledDrawBitmap(0, 0, &bmp_logo64_half); + oledDrawBitmapFlip(24, 0, &bmp_logo64_half); if (firmware_present_new()) { oledDrawStringCenter(90, 10, "Trezor", FONT_STANDARD); oledDrawStringCenter(90, 30, "Bootloader", FONT_STANDARD); @@ -137,7 +138,8 @@ int main(void) { if (firmware_present_new() && !left_pressed) { oledClear(); - oledDrawBitmap(40, 0, &bmp_logo64_empty); + oledDrawBitmap(40, 0, &bmp_logo64_empty_half); + oledDrawBitmapFlip(40 + 24, 0, &bmp_logo64_empty_half); oledRefresh(); const image_header *hdr = diff --git a/legacy/demo/demo.c b/legacy/demo/demo.c index 59d0aea623..00d8da5eb1 100644 --- a/legacy/demo/demo.c +++ b/legacy/demo/demo.c @@ -277,7 +277,8 @@ int main(void) { switch (state) { case 0: oledClear(); - oledDrawBitmap(40, 0, &bmp_logo64); + oledDrawBitmap(40, 0, &bmp_logo64_half); + oledDrawBitmapFlip(40 + 24, 0, &bmp_logo64_half); break; } oledRefresh(); diff --git a/legacy/firmware/layout2.c b/legacy/firmware/layout2.c index e89026bf02..59fb0349fe 100644 --- a/legacy/firmware/layout2.c +++ b/legacy/firmware/layout2.c @@ -277,7 +277,8 @@ void layoutHome(void) { oledDrawStringCenter(OLED_WIDTH / 2, OLED_HEIGHT - 8, label, FONT_STANDARD); } else { - oledDrawBitmap(40, 0, &bmp_logo64); + oledDrawBitmap(40, 0, &bmp_logo64_half); + oledDrawBitmapFlip(40 + 24, 0, &bmp_logo64_half); } } diff --git a/legacy/firmware/trezor.c b/legacy/firmware/trezor.c index 1e0aeba444..5316ee5eaf 100644 --- a/legacy/firmware/trezor.c +++ b/legacy/firmware/trezor.c @@ -149,7 +149,8 @@ int main(void) { #endif #endif - oledDrawBitmap(40, 0, &bmp_logo64); + oledDrawBitmap(40, 0, &bmp_logo64_half); + oledDrawBitmapFlip(40 + 24, 0, &bmp_logo64_half); oledRefresh(); config_init(); diff --git a/legacy/gen/bitmaps.c b/legacy/gen/bitmaps.c index f1da68e47f..3f67e5e654 100644 --- a/legacy/gen/bitmaps.c +++ b/legacy/gen/bitmaps.c @@ -24,8 +24,8 @@ const uint8_t bmp_icon_question_data[] = { 0x07, 0xe0, 0x0f, 0xf0, 0x1e, 0x78, 0 const uint8_t bmp_icon_warning_data[] = { 0x01, 0x80, 0x01, 0x80, 0x03, 0xc0, 0x03, 0xc0, 0x07, 0xe0, 0x07, 0xe0, 0x0e, 0x70, 0x0e, 0x70, 0x1e, 0x78, 0x1e, 0x78, 0x3e, 0x7c, 0x3f, 0xfc, 0x7e, 0x7e, 0x7e, 0x7e, 0xff, 0xff, 0xff, 0xff, }; const uint8_t bmp_logo48_data[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x03, 0xff, 0xc0, 0x00, 0x00, 0x07, 0xff, 0xe0, 0x00, 0x00, 0x0f, 0xff, 0xf0, 0x00, 0x00, 0x1f, 0xff, 0xf8, 0x00, 0x00, 0x3f, 0xff, 0xfc, 0x00, 0x00, 0x3f, 0xc3, 0xfc, 0x00, 0x00, 0x3f, 0x00, 0xfc, 0x00, 0x00, 0x7f, 0x00, 0xfe, 0x00, 0x00, 0x7e, 0x00, 0x7e, 0x00, 0x00, 0x7e, 0x00, 0x7e, 0x00, 0x00, 0x7e, 0x00, 0x7e, 0x00, 0x00, 0x7e, 0x00, 0x7e, 0x00, 0x00, 0x7e, 0x00, 0x7e, 0x00, 0x00, 0x7e, 0x00, 0x7e, 0x00, 0x0f, 0xff, 0xff, 0xff, 0xf0, 0x0f, 0xff, 0xff, 0xff, 0xf0, 0x0f, 0xff, 0xff, 0xff, 0xf0, 0x0f, 0xff, 0xff, 0xff, 0xf0, 0x0f, 0xff, 0xff, 0xff, 0xf0, 0x0f, 0xc0, 0x00, 0x03, 0xf0, 0x0f, 0xc0, 0x00, 0x03, 0xf0, 0x0f, 0xc0, 0x00, 0x03, 0xf0, 0x0f, 0xc0, 0x00, 0x03, 0xf0, 0x0f, 0xc0, 0x00, 0x03, 0xf0, 0x0f, 0xc0, 0x00, 0x03, 0xf0, 0x0f, 0xc0, 0x00, 0x03, 0xf0, 0x0f, 0xc0, 0x00, 0x03, 0xf0, 0x0f, 0xc0, 0x00, 0x03, 0xf0, 0x0f, 0xc0, 0x00, 0x03, 0xf0, 0x0f, 0xc0, 0x00, 0x03, 0xf0, 0x0f, 0xc0, 0x00, 0x03, 0xf0, 0x0f, 0xc0, 0x00, 0x03, 0xf0, 0x0f, 0xc0, 0x00, 0x03, 0xf0, 0x0f, 0xc0, 0x00, 0x03, 0xf0, 0x0f, 0xf0, 0x00, 0x0f, 0xf0, 0x0f, 0xfc, 0x00, 0x3f, 0xf0, 0x0f, 0xff, 0x00, 0xff, 0xf0, 0x0f, 0xff, 0xc3, 0xff, 0xf0, 0x03, 0xff, 0xff, 0xff, 0xc0, 0x00, 0xff, 0xff, 0xff, 0x00, 0x00, 0x3f, 0xff, 0xfc, 0x00, 0x00, 0x0f, 0xff, 0xf0, 0x00, 0x00, 0x03, 0xff, 0xc0, 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; const uint8_t bmp_logo48_empty_data[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x03, 0x81, 0xc0, 0x00, 0x00, 0x04, 0x00, 0x20, 0x00, 0x00, 0x08, 0x00, 0x10, 0x00, 0x00, 0x10, 0x00, 0x08, 0x00, 0x00, 0x20, 0x3c, 0x04, 0x00, 0x00, 0x20, 0xc3, 0x04, 0x00, 0x00, 0x21, 0x00, 0x84, 0x00, 0x00, 0x41, 0x00, 0x82, 0x00, 0x00, 0x42, 0x00, 0x42, 0x00, 0x00, 0x42, 0x00, 0x42, 0x00, 0x00, 0x42, 0x00, 0x42, 0x00, 0x00, 0x42, 0x00, 0x42, 0x00, 0x00, 0x42, 0x00, 0x42, 0x00, 0x00, 0x42, 0x00, 0x42, 0x00, 0x0f, 0xc3, 0xff, 0xc3, 0xf0, 0x08, 0x00, 0x00, 0x00, 0x10, 0x08, 0x00, 0x00, 0x00, 0x10, 0x08, 0x00, 0x00, 0x00, 0x10, 0x08, 0x7f, 0xff, 0xfe, 0x10, 0x08, 0x40, 0x00, 0x02, 0x10, 0x08, 0x40, 0x00, 0x02, 0x10, 0x08, 0x40, 0x00, 0x02, 0x10, 0x08, 0x40, 0x00, 0x02, 0x10, 0x08, 0x40, 0x00, 0x02, 0x10, 0x08, 0x40, 0x00, 0x02, 0x10, 0x08, 0x40, 0x00, 0x02, 0x10, 0x08, 0x40, 0x00, 0x02, 0x10, 0x08, 0x40, 0x00, 0x02, 0x10, 0x08, 0x40, 0x00, 0x02, 0x10, 0x08, 0x40, 0x00, 0x02, 0x10, 0x08, 0x40, 0x00, 0x02, 0x10, 0x08, 0x40, 0x00, 0x02, 0x10, 0x08, 0x40, 0x00, 0x02, 0x10, 0x08, 0x40, 0x00, 0x02, 0x10, 0x08, 0x30, 0x00, 0x0c, 0x10, 0x08, 0x0c, 0x00, 0x30, 0x10, 0x08, 0x03, 0x00, 0xc0, 0x10, 0x0c, 0x00, 0xc3, 0x00, 0x30, 0x03, 0x00, 0x3c, 0x00, 0xc0, 0x00, 0xc0, 0x00, 0x03, 0x00, 0x00, 0x30, 0x00, 0x0c, 0x00, 0x00, 0x0c, 0x00, 0x30, 0x00, 0x00, 0x03, 0x00, 0xc0, 0x00, 0x00, 0x00, 0xc3, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -const uint8_t bmp_logo64_data[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x7f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0xc0, 0x00, 0x00, 0x07, 0xff, 0xff, 0xe0, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x0f, 0xff, 0xff, 0xf0, 0x00, 0x00, 0x1f, 0xf8, 0x1f, 0xf8, 0x00, 0x00, 0x3f, 0xf0, 0x0f, 0xfc, 0x00, 0x00, 0x3f, 0xe0, 0x07, 0xfc, 0x00, 0x00, 0x3f, 0xc0, 0x03, 0xfc, 0x00, 0x00, 0x7f, 0x80, 0x01, 0xfe, 0x00, 0x00, 0x7f, 0x80, 0x01, 0xfe, 0x00, 0x00, 0x7f, 0x80, 0x01, 0xfe, 0x00, 0x00, 0x7f, 0x80, 0x01, 0xfe, 0x00, 0x00, 0x7f, 0x80, 0x01, 0xfe, 0x00, 0x00, 0x7f, 0x80, 0x01, 0xfe, 0x00, 0x00, 0x7f, 0x80, 0x01, 0xfe, 0x00, 0x00, 0x7f, 0x80, 0x01, 0xfe, 0x00, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x1f, 0xff, 0xff, 0xff, 0xff, 0xf8, 0x1f, 0xe0, 0x00, 0x00, 0x07, 0xf8, 0x1f, 0xe0, 0x00, 0x00, 0x07, 0xf8, 0x1f, 0xe0, 0x00, 0x00, 0x07, 0xf8, 0x1f, 0xe0, 0x00, 0x00, 0x07, 0xf8, 0x1f, 0xe0, 0x00, 0x00, 0x07, 0xf8, 0x1f, 0xe0, 0x00, 0x00, 0x07, 0xf8, 0x1f, 0xe0, 0x00, 0x00, 0x07, 0xf8, 0x1f, 0xe0, 0x00, 0x00, 0x07, 0xf8, 0x1f, 0xe0, 0x00, 0x00, 0x07, 0xf8, 0x1f, 0xe0, 0x00, 0x00, 0x07, 0xf8, 0x1f, 0xe0, 0x00, 0x00, 0x07, 0xf8, 0x1f, 0xe0, 0x00, 0x00, 0x07, 0xf8, 0x1f, 0xe0, 0x00, 0x00, 0x07, 0xf8, 0x1f, 0xe0, 0x00, 0x00, 0x07, 0xf8, 0x1f, 0xe0, 0x00, 0x00, 0x07, 0xf8, 0x1f, 0xe0, 0x00, 0x00, 0x07, 0xf8, 0x1f, 0xe0, 0x00, 0x00, 0x07, 0xf8, 0x1f, 0xe0, 0x00, 0x00, 0x07, 0xf8, 0x1f, 0xe0, 0x00, 0x00, 0x07, 0xf8, 0x1f, 0xe0, 0x00, 0x00, 0x07, 0xf8, 0x1f, 0xf8, 0x00, 0x00, 0x1f, 0xf8, 0x1f, 0xfe, 0x00, 0x00, 0x7f, 0xf8, 0x1f, 0xff, 0x80, 0x01, 0xff, 0xf8, 0x1f, 0xff, 0xe0, 0x07, 0xff, 0xf8, 0x1f, 0xff, 0xf8, 0x1f, 0xff, 0xf8, 0x07, 0xff, 0xfe, 0x7f, 0xff, 0xe0, 0x01, 0xff, 0xff, 0xff, 0xff, 0x80, 0x00, 0x7f, 0xff, 0xff, 0xfe, 0x00, 0x00, 0x1f, 0xff, 0xff, 0xf8, 0x00, 0x00, 0x07, 0xff, 0xff, 0xe0, 0x00, 0x00, 0x01, 0xff, 0xff, 0x80, 0x00, 0x00, 0x00, 0x7f, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x1f, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x07, 0xe0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -const uint8_t bmp_logo64_empty_data[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x70, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x04, 0x00, 0x00, 0x20, 0x00, 0x00, 0x08, 0x00, 0x00, 0x10, 0x00, 0x00, 0x08, 0x07, 0xe0, 0x10, 0x00, 0x00, 0x10, 0x08, 0x10, 0x08, 0x00, 0x00, 0x20, 0x10, 0x08, 0x04, 0x00, 0x00, 0x20, 0x20, 0x04, 0x04, 0x00, 0x00, 0x20, 0x40, 0x02, 0x04, 0x00, 0x00, 0x40, 0x80, 0x01, 0x02, 0x00, 0x00, 0x40, 0x80, 0x01, 0x02, 0x00, 0x00, 0x40, 0x80, 0x01, 0x02, 0x00, 0x00, 0x40, 0x80, 0x01, 0x02, 0x00, 0x00, 0x40, 0x80, 0x01, 0x02, 0x00, 0x00, 0x40, 0x80, 0x01, 0x02, 0x00, 0x00, 0x40, 0x80, 0x01, 0x02, 0x00, 0x00, 0x40, 0x80, 0x01, 0x02, 0x00, 0x1f, 0xc0, 0xff, 0xff, 0x03, 0xf8, 0x10, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x08, 0x10, 0x3f, 0xff, 0xff, 0xfc, 0x08, 0x10, 0x20, 0x00, 0x00, 0x04, 0x08, 0x10, 0x20, 0x00, 0x00, 0x04, 0x08, 0x10, 0x20, 0x00, 0x00, 0x04, 0x08, 0x10, 0x20, 0x00, 0x00, 0x04, 0x08, 0x10, 0x20, 0x00, 0x00, 0x04, 0x08, 0x10, 0x20, 0x00, 0x00, 0x04, 0x08, 0x10, 0x20, 0x00, 0x00, 0x04, 0x08, 0x10, 0x20, 0x00, 0x00, 0x04, 0x08, 0x10, 0x20, 0x00, 0x00, 0x04, 0x08, 0x10, 0x20, 0x00, 0x00, 0x04, 0x08, 0x10, 0x20, 0x00, 0x00, 0x04, 0x08, 0x10, 0x20, 0x00, 0x00, 0x04, 0x08, 0x10, 0x20, 0x00, 0x00, 0x04, 0x08, 0x10, 0x20, 0x00, 0x00, 0x04, 0x08, 0x10, 0x20, 0x00, 0x00, 0x04, 0x08, 0x10, 0x20, 0x00, 0x00, 0x04, 0x08, 0x10, 0x20, 0x00, 0x00, 0x04, 0x08, 0x10, 0x20, 0x00, 0x00, 0x04, 0x08, 0x10, 0x20, 0x00, 0x00, 0x04, 0x08, 0x10, 0x20, 0x00, 0x00, 0x04, 0x08, 0x10, 0x18, 0x00, 0x00, 0x18, 0x08, 0x10, 0x06, 0x00, 0x00, 0x60, 0x08, 0x10, 0x01, 0x80, 0x01, 0x80, 0x08, 0x10, 0x00, 0x60, 0x06, 0x00, 0x08, 0x18, 0x00, 0x18, 0x18, 0x00, 0x18, 0x06, 0x00, 0x06, 0x60, 0x00, 0x60, 0x01, 0x80, 0x01, 0x80, 0x01, 0x80, 0x00, 0x60, 0x00, 0x00, 0x06, 0x00, 0x00, 0x18, 0x00, 0x00, 0x18, 0x00, 0x00, 0x06, 0x00, 0x00, 0x60, 0x00, 0x00, 0x01, 0x80, 0x01, 0x80, 0x00, 0x00, 0x00, 0x60, 0x06, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x00, 0x06, 0x60, 0x00, 0x00, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; +const uint8_t bmp_logo64_empty_half_data[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x70, 0x00, 0x00, 0x80, 0x00, 0x03, 0x00, 0x00, 0x04, 0x00, 0x00, 0x08, 0x00, 0x00, 0x08, 0x07, 0x00, 0x10, 0x08, 0x00, 0x20, 0x10, 0x00, 0x20, 0x20, 0x00, 0x20, 0x40, 0x00, 0x40, 0x80, 0x00, 0x40, 0x80, 0x00, 0x40, 0x80, 0x00, 0x40, 0x80, 0x00, 0x40, 0x80, 0x00, 0x40, 0x80, 0x00, 0x40, 0x80, 0x00, 0x40, 0x80, 0x1f, 0xc0, 0xff, 0x10, 0x00, 0x00, 0x10, 0x00, 0x00, 0x10, 0x00, 0x00, 0x10, 0x00, 0x00, 0x10, 0x00, 0x00, 0x10, 0x3f, 0xff, 0x10, 0x20, 0x00, 0x10, 0x20, 0x00, 0x10, 0x20, 0x00, 0x10, 0x20, 0x00, 0x10, 0x20, 0x00, 0x10, 0x20, 0x00, 0x10, 0x20, 0x00, 0x10, 0x20, 0x00, 0x10, 0x20, 0x00, 0x10, 0x20, 0x00, 0x10, 0x20, 0x00, 0x10, 0x20, 0x00, 0x10, 0x20, 0x00, 0x10, 0x20, 0x00, 0x10, 0x20, 0x00, 0x10, 0x20, 0x00, 0x10, 0x20, 0x00, 0x10, 0x20, 0x00, 0x10, 0x20, 0x00, 0x10, 0x20, 0x00, 0x10, 0x18, 0x00, 0x10, 0x06, 0x00, 0x10, 0x01, 0x80, 0x10, 0x00, 0x60, 0x18, 0x00, 0x18, 0x06, 0x00, 0x06, 0x01, 0x80, 0x01, 0x00, 0x60, 0x00, 0x00, 0x18, 0x00, 0x00, 0x06, 0x00, 0x00, 0x01, 0x80, 0x00, 0x00, 0x60, 0x00, 0x00, 0x18, 0x00, 0x00, 0x06, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, }; +const uint8_t bmp_logo64_half_data[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x7f, 0x00, 0x00, 0xff, 0x00, 0x03, 0xff, 0x00, 0x07, 0xff, 0x00, 0x0f, 0xff, 0x00, 0x0f, 0xff, 0x00, 0x1f, 0xf8, 0x00, 0x3f, 0xf0, 0x00, 0x3f, 0xe0, 0x00, 0x3f, 0xc0, 0x00, 0x7f, 0x80, 0x00, 0x7f, 0x80, 0x00, 0x7f, 0x80, 0x00, 0x7f, 0x80, 0x00, 0x7f, 0x80, 0x00, 0x7f, 0x80, 0x00, 0x7f, 0x80, 0x00, 0x7f, 0x80, 0x1f, 0xff, 0xff, 0x1f, 0xff, 0xff, 0x1f, 0xff, 0xff, 0x1f, 0xff, 0xff, 0x1f, 0xff, 0xff, 0x1f, 0xff, 0xff, 0x1f, 0xff, 0xff, 0x1f, 0xe0, 0x00, 0x1f, 0xe0, 0x00, 0x1f, 0xe0, 0x00, 0x1f, 0xe0, 0x00, 0x1f, 0xe0, 0x00, 0x1f, 0xe0, 0x00, 0x1f, 0xe0, 0x00, 0x1f, 0xe0, 0x00, 0x1f, 0xe0, 0x00, 0x1f, 0xe0, 0x00, 0x1f, 0xe0, 0x00, 0x1f, 0xe0, 0x00, 0x1f, 0xe0, 0x00, 0x1f, 0xe0, 0x00, 0x1f, 0xe0, 0x00, 0x1f, 0xe0, 0x00, 0x1f, 0xe0, 0x00, 0x1f, 0xe0, 0x00, 0x1f, 0xe0, 0x00, 0x1f, 0xe0, 0x00, 0x1f, 0xf8, 0x00, 0x1f, 0xfe, 0x00, 0x1f, 0xff, 0x80, 0x1f, 0xff, 0xe0, 0x1f, 0xff, 0xf8, 0x07, 0xff, 0xfe, 0x01, 0xff, 0xff, 0x00, 0x7f, 0xff, 0x00, 0x1f, 0xff, 0x00, 0x07, 0xff, 0x00, 0x01, 0xff, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x07, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, }; const uint8_t bmp_webauthn_data[] = { 0x00, 0x00, 0x1f, 0x80, 0x00, 0x00, 0x7f, 0xe0, 0x00, 0x01, 0xff, 0xf8, 0x00, 0x03, 0xfe, 0x1c, 0x00, 0x03, 0xfc, 0x0c, 0x00, 0x07, 0xf8, 0x06, 0x00, 0x07, 0xf8, 0x06, 0x00, 0x0f, 0xf8, 0x06, 0x00, 0x0f, 0xf8, 0x07, 0x00, 0x0f, 0xfc, 0x0f, 0x00, 0x0f, 0xfe, 0x1f, 0x00, 0x0f, 0xff, 0xff, 0x00, 0x0f, 0xff, 0xff, 0x00, 0x07, 0xff, 0xfe, 0x00, 0x0f, 0xff, 0xfe, 0x00, 0x1f, 0xff, 0xfc, 0x00, 0x3f, 0xff, 0xfc, 0x00, 0x7f, 0xff, 0xf8, 0x00, 0xff, 0xff, 0xe0, 0x01, 0xff, 0xdf, 0x80, 0x03, 0xff, 0x80, 0x00, 0x07, 0xff, 0x00, 0x00, 0x0f, 0xfe, 0x00, 0x00, 0x1f, 0xfc, 0x00, 0x00, 0x3f, 0xf8, 0x00, 0x00, 0x7f, 0x80, 0x00, 0x00, 0xff, 0x80, 0x00, 0x00, 0xff, 0x80, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, 0x00, }; const BITMAP bmp_btn_cancel = {8, 8, bmp_btn_cancel_data}; @@ -51,6 +51,6 @@ const BITMAP bmp_icon_question = {16, 16, bmp_icon_question_data}; const BITMAP bmp_icon_warning = {16, 16, bmp_icon_warning_data}; const BITMAP bmp_logo48 = {40, 48, bmp_logo48_data}; const BITMAP bmp_logo48_empty = {40, 48, bmp_logo48_empty_data}; -const BITMAP bmp_logo64 = {48, 64, bmp_logo64_data}; -const BITMAP bmp_logo64_empty = {48, 64, bmp_logo64_empty_data}; +const BITMAP bmp_logo64_empty_half = {24, 64, bmp_logo64_empty_half_data}; +const BITMAP bmp_logo64_half = {24, 64, bmp_logo64_half_data}; const BITMAP bmp_webauthn = {32, 32, bmp_webauthn_data}; diff --git a/legacy/gen/bitmaps.h b/legacy/gen/bitmaps.h index 08809e1187..8ec85c23e7 100644 --- a/legacy/gen/bitmaps.h +++ b/legacy/gen/bitmaps.h @@ -31,8 +31,8 @@ extern const BITMAP bmp_icon_question; extern const BITMAP bmp_icon_warning; extern const BITMAP bmp_logo48; extern const BITMAP bmp_logo48_empty; -extern const BITMAP bmp_logo64; -extern const BITMAP bmp_logo64_empty; +extern const BITMAP bmp_logo64_empty_half; +extern const BITMAP bmp_logo64_half; extern const BITMAP bmp_webauthn; #endif diff --git a/legacy/gen/bitmaps/logo64.png b/legacy/gen/bitmaps/logo64.png deleted file mode 100644 index 1ea8747a9072cb5addf593098f6deac981411eb8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 339 zcmV-Z0j&OsP){xIuMT2X? z+gf;j2Bw&6SP|V@pp?JFPott=qd+#FO3az!A^VB5PkDWV| zQYO)WoQ;JsMAcevF3fJXJ&0yAWu0<3>+g5BSxO0Bp4~^I{#csJN8V;SlD^E<9B2Vj zih5#EiUx(((>7NE5r{x&%Z3HUza^=*WbAaO=3@^LDDEqpc8)okakVq`d3^YJfjvYZ z0uhKn1R@ZD2t=U&8uCSCn}Yq5wNghrZhSrS23Qo@>hp6=2UO`|@LP4xUK&+cl9#j>my#c%|JwfP#yVd{z002ov JPDHLkV1oUgh8q9? diff --git a/legacy/gen/bitmaps/logo64_empty_half.png b/legacy/gen/bitmaps/logo64_empty_half.png new file mode 100644 index 0000000000000000000000000000000000000000..1af6256f91fdd2d63010182356eb522189e865bd GIT binary patch literal 6730 zcmeHMdpJ~G+ni92MWPxr8-tl)W|$dCg>tAUr#vDG5uv9j zDW`}IDyKv_RVwvV3Qd zu8@SmU<*jr=8n*}JoGUU7lE$vH{f^}Ok6y~*_Go+=E4J5OfQ;02c{1>wO zZx|*gNq=20aeZ?)^}H_WFZNqB6!?u2RDl1mV!tEMQ>2e0< zE0N7rZokt}XwZLh;)Bz>n~{TWvO-hi6jr`H7?cHe?Tji4?mF{;VdO5&AT->+yzo>G za#!&6Af~vE=%>zSoy*sS&W}*>}H`e#&B3eM#C?ZCXts_(@opO{1QI2sQYyqUX(NNdgnyeFj97(E2?Ly-=8bhyXHv5q1tZw zx-AnGgTYvwl(~7PaYWh^?Q%&Oz4}E_hvW-d8f7T9M=5cuI|iJr(Yf`c`jYc6YK|_! zdh5DhxTn&Xj(K5wdBDy6y-cI4;5A)ahd}Q^tSZ(BXe)49ZLx=XT>)5^V zvt5b!JX?}gm1~{D^R~!khB4O^0br5*VXd=F|RGHN7?Y^lf5i}*rR%`!K)2+>9x~@F`i1U=Bkbqn2aM6WH$+oLo+{u9xArq5gpKjE)rERHVv%f7_iiDpoDU zn>sdl@tYLZa8v2p@2_n?a`XtS;3R*)1~@0IcL(Xk-t%4-_AjCXx@xB=B4Tb&e0GUk z7Y*dBvsk*}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legacy/gen/bitmaps/logo64_half.png new file mode 100644 index 0000000000000000000000000000000000000000..b154fad44e8e2712a1ee63eb8564bf885912f78d GIT binary patch literal 6391 zcmeHMXH-+!77idNAc`oW14@j76w?byAV}|lP(*CVO>zSvq=%}~LB8o^=ib@-W zQ5gh9L~J++jwo0WL>Orz>ezTU0TthyH}ARDd;d&Ul6%hi_P6)>&fe$TyRwbp>8z#k zg9Z!+({goj@PU5kK_8oG%Fy@j%WxtLrj{4u7a;QiBH<#5ki!iF;j(BE2nVCM92hLB zy>w;oi4oHD_q)w}ln0L(WaE3`-N8z3CylN(E_v8mVUjxM%pFywj7!VoyxwZY8Jjxa zXq+RNrV)p#4%1k;cXgcOz-mfWIr?3?_3PA*w`sNq9C>YRb58xa;hgpKlEOzmTh&I9m$46Ku~R?w>U*eK@_lX%CTSBUHO8ao>{JS)mzTa%wO;e{@l8m2B&W7qrBh zffFf2P5@tb;8KR_`4`Tq$QKMuCdT`T+3h3cxfX&;HkTK8^{MNwTcO?;nD(R>v0bY; zr&(-_H|Xb|dv)Mr6I{K)%e*6^WMf~sQ+KiDyWktyAvaE(HAls_{7m_!8sU{5U|W^e zrd*c1yHUE&{E1uAGya~l#f4^Ng%zYdU}#Y_DyDA{zg0^+YrgSeVxg_cfIBH8EMvu# zG=udq86g$@B->K8Xk<)Ng5$McSMBHBF!4G8`cnqH_QSS6O7kd`u3!AQ!*c=* z`Q&Lzo70|Ha%{C}ugNd$hGN%^1+3Imt!d7D6yzO#@Mxg$M1z>^7_wvA!v1z1^;Hwh zM}0?567qYepVSHQe;#?t!4qn$}6$DofAl@MSj}wOJn6#=T*Z zD@A*lZu=x=ciB6-o=Gobi!!CA0hQ+^bseg+-HsKu_Z=_KyOa@HRy zujwu9NU^$UzneCC?^?4;9^u~5;+^D{%SSwt+ACY>%jPKK|RTx|KE-kn^q;mEyWfyMFgG7^22&Xy>B+_9_7cfbXghWrbT z{d~);4AVEqR%h8ybr&mB@}EonEuCBIpYTetZPX{}vkR4cR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/ 8] & (1 << (7 - ii % 8))) { + oledDrawPixel(x + i, y + j); + } else { + oledClearPixel(x + i, y + j); + } + } + } +} + /* * Inverts box between (x1,y1) and (x2,y2) inclusive. */ diff --git a/legacy/oled.h b/legacy/oled.h index 3b883175ce..dd68d6264e 100644 --- a/legacy/oled.h +++ b/legacy/oled.h @@ -49,6 +49,7 @@ void oledDrawString(int x, int y, const char *text, uint8_t font); void oledDrawStringCenter(int x, int y, const char *text, uint8_t font); void oledDrawStringRight(int x, int y, const char *text, uint8_t font); void oledDrawBitmap(int x, int y, const BITMAP *bmp); +void oledDrawBitmapFlip(int x, int y, const BITMAP *bmp); void oledInvert(int x1, int y1, int x2, int y2); void oledBox(int x1, int y1, int x2, int y2, bool set); void oledHLine(int y);