1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-26 17:38:39 +00:00
trezor-firmware/bootloader/ui.c
2016-10-20 15:25:26 +02:00

44 lines
859 B
C

#include "ui.h"
#include "display.h"
#include "toi_trezor.h"
#define ui_WHITE 0xFFFF
#define ui_BLACK 0x0000
#define ui_BLUE 0x24BE
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);
}
void screen_info(void)
{
}
void screen_upload_request(void)
{
}
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);
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();
}
void screen_upload_success(void)
{
}
void screen_upload_abort(void)
{
}