1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-23 23:08:14 +00:00
trezor-firmware/bootloader/ui.c

44 lines
859 B
C
Raw Normal View History

2016-10-04 16:01:48 +00:00
#include "ui.h"
2016-10-03 14:17:49 +00:00
#include "display.h"
2016-10-04 16:01:48 +00:00
#include "toi_trezor.h"
2016-10-03 14:17:49 +00:00
#define ui_WHITE 0xFFFF
#define ui_BLACK 0x0000
#define ui_BLUE 0x24BE
2016-10-03 14:17:49 +00:00
void screen_welcome(void)
{
display_image(0, 0, 240, 240, toi_trezor, sizeof(toi_trezor));
display_text(0, 240, "bootloader", 10, FONT_MONO, ui_WHITE, ui_BLACK);
2016-10-03 14:17:49 +00:00
}
void screen_info(void)
{
}
void screen_upload_request(void)
{
}
2016-10-03 14:17:49 +00:00
void screen_upload_progress(int permil)
{
char label[5] = "100%";
char *plabel = label;
// TODO: convert permil -> plabel
display_text_center(120, 192 + 32, "Uploading firmware", -1, FONT_NORMAL, ui_WHITE, ui_BLACK);
2016-10-20 13:25:26 +00:00
display_loader(permil, 0, ui_BLUE, ui_BLACK, 0, 0, 0);
display_text_center(120, 192 / 2 + 14 / 2, plabel, -1, FONT_BOLD, ui_WHITE, ui_BLACK);
display_refresh();
2016-10-03 14:17:49 +00:00
}
void screen_upload_success(void)
{
}
void screen_upload_abort(void)
{
}