2016-10-03 14:17:49 +00:00
|
|
|
#include "display.h"
|
|
|
|
#include "bootloader_trezor.h"
|
|
|
|
|
2016-10-03 22:21:06 +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));
|
2016-10-03 22:21:06 +00:00
|
|
|
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 22:21:06 +00:00
|
|
|
|
2016-10-03 14:17:49 +00:00
|
|
|
void screen_upload_progress(int permil)
|
|
|
|
{
|
2016-10-03 22:21:06 +00:00
|
|
|
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);
|
|
|
|
display_loader(permil, 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)
|
|
|
|
{
|
|
|
|
}
|