diff --git a/legacy/bootloader/bootloader.c b/legacy/bootloader/bootloader.c index e46c260cd..37785c9e9 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 59d0aea62..00d8da5eb 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 e89026bf0..59fb0349f 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 1e0aeba44..5316ee5ea 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 f1da68e47..3f67e5e65 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 08809e118..8ec85c23e 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 1ea8747a9..000000000 Binary files a/legacy/gen/bitmaps/logo64.png and /dev/null differ diff --git a/legacy/gen/bitmaps/logo64_empty.png b/legacy/gen/bitmaps/logo64_empty.png deleted file mode 100644 index ce7a006fd..000000000 Binary files a/legacy/gen/bitmaps/logo64_empty.png and /dev/null differ diff --git a/legacy/gen/bitmaps/logo64_empty_half.png b/legacy/gen/bitmaps/logo64_empty_half.png new file mode 100644 index 000000000..1af6256f9 Binary files /dev/null and b/legacy/gen/bitmaps/logo64_empty_half.png differ diff --git a/legacy/gen/bitmaps/logo64_half.png b/legacy/gen/bitmaps/logo64_half.png new file mode 100644 index 000000000..b154fad44 Binary files /dev/null and b/legacy/gen/bitmaps/logo64_half.png differ diff --git a/legacy/oled.c b/legacy/oled.c index 92e07a909..16a496e7b 100644 --- a/legacy/oled.c +++ b/legacy/oled.c @@ -352,6 +352,19 @@ void oledDrawBitmap(int x, int y, const BITMAP *bmp) { } } +void oledDrawBitmapFlip(int x, int y, const BITMAP *bmp) { + for (int i = 0; i < bmp->width; i++) { + int ii = bmp->width - 1 - i; + for (int j = 0; j < bmp->height; j++) { + if (bmp->data[(ii / 8) + j * bmp->width / 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 3b883175c..dd68d6264 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);