mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-12-23 06:48:16 +00:00
bootloader ui (work in progress)
This commit is contained in:
parent
031550a5ed
commit
31a937de1b
@ -78,6 +78,7 @@ LIBS += $(shell $(CC) -print-libgcc-file-name)
|
||||
|
||||
SRC_C = \
|
||||
bootloader.c \
|
||||
bootloader_ui.c \
|
||||
system_stm32.c \
|
||||
$(wildcard boards/$(BOARD)/*.c)
|
||||
|
||||
@ -129,6 +130,7 @@ SRC_USBDEV = $(addprefix $(USBDEV_DIR)/,\
|
||||
|
||||
SRC_MODUI = $(addprefix extmod/modtrezorui/,\
|
||||
display.c \
|
||||
inflate.c \
|
||||
font_robotomono_regular.c \
|
||||
)
|
||||
|
||||
@ -201,8 +203,6 @@ CDCINF_TEMPLATE = pybcdc.inf_template
|
||||
GEN_CDCINF_FILE = $(HEADER_BUILD)/pybcdc.inf
|
||||
GEN_CDCINF_HEADER = $(HEADER_BUILD)/pybcdc_inf.h
|
||||
|
||||
# List of sources for qstr extraction
|
||||
SRC_QSTR += $(SRC_C)
|
||||
# Append any auto-generated sources that are needed by sources listed in
|
||||
# SRC_QSTR
|
||||
SRC_QSTR_AUTO_DEPS += $(GEN_CDCINF_HEADER)
|
||||
|
@ -1,6 +1,7 @@
|
||||
#include STM32_HAL_H
|
||||
|
||||
#include "display.h"
|
||||
#include "bootloader_ui.h"
|
||||
|
||||
// ### from main.c
|
||||
|
||||
@ -102,17 +103,15 @@ int main(void) {
|
||||
|
||||
display_init();
|
||||
display_clear();
|
||||
display_text(100, 120, "TREZOR", 6, FONT_MONO, 0xFFFF, 0x0000);
|
||||
display_text(90, 140, "bootloader", 10, FONT_MONO, 0xFFFF, 0x0000);
|
||||
display_backlight(255);
|
||||
|
||||
screen_welcome();
|
||||
|
||||
for (;;) {
|
||||
display_backlight(255);
|
||||
HAL_Delay(250);
|
||||
display_backlight(0);
|
||||
display_backlight(0);
|
||||
HAL_Delay(250);
|
||||
display_backlight(100);
|
||||
HAL_Delay(250);
|
||||
display_backlight(0);
|
||||
HAL_Delay(250);
|
||||
display_backlight(255);
|
||||
}
|
||||
|
||||
__fatal_error("end");
|
||||
|
||||
|
3
bootloader/bootloader_trezor.h
Normal file
3
bootloader/bootloader_trezor.h
Normal file
File diff suppressed because one or more lines are too long
28
bootloader/bootloader_ui.c
Normal file
28
bootloader/bootloader_ui.c
Normal file
@ -0,0 +1,28 @@
|
||||
#include "display.h"
|
||||
#include "bootloader_trezor.h"
|
||||
|
||||
void screen_welcome(void)
|
||||
{
|
||||
display_image(0, 0, 240, 240, toi_trezor, sizeof(toi_trezor));
|
||||
display_text(0, 240, "bootloader", 10, FONT_MONO, 0xFFFF, 0x0000);
|
||||
}
|
||||
|
||||
void screen_info(void)
|
||||
{
|
||||
}
|
||||
|
||||
void screen_upload_request(void)
|
||||
{
|
||||
}
|
||||
|
||||
void screen_upload_progress(int permil)
|
||||
{
|
||||
}
|
||||
|
||||
void screen_upload_success(void)
|
||||
{
|
||||
}
|
||||
|
||||
void screen_upload_abort(void)
|
||||
{
|
||||
}
|
11
bootloader/bootloader_ui.h
Normal file
11
bootloader/bootloader_ui.h
Normal file
@ -0,0 +1,11 @@
|
||||
#ifndef __BOOTLOADER_UI_H__
|
||||
#define __BOOTLOADER_UI_H__
|
||||
|
||||
void screen_welcome(void);
|
||||
void screen_info(void);
|
||||
void screen_upload_request(void);
|
||||
void screen_upload_progress(int permil);
|
||||
void screen_upload_success(void);
|
||||
void screen_upload_abort(void);
|
||||
|
||||
#endif
|
@ -8,6 +8,8 @@
|
||||
#ifndef __DISPLAY_H__
|
||||
#define __DISPLAY_H__
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#define DISPLAY_RESX 240
|
||||
#define DISPLAY_RESY 240
|
||||
|
||||
|
2
vendor/micropython
vendored
2
vendor/micropython
vendored
@ -1 +1 @@
|
||||
Subproject commit 26604dc1ac41b432e617f56f5a35cb53820e70a4
|
||||
Subproject commit fa1aa1bd97ee3ebfa65ee6ed8123f6bc9e2033d0
|
Loading…
Reference in New Issue
Block a user