mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-18 05:28:40 +00:00
fixup! feat(core): change display type for model R
This commit is contained in:
parent
4009a0fd2a
commit
187d69a80e
@ -253,6 +253,8 @@ int main(void) {
|
||||
dma2d_init();
|
||||
#endif
|
||||
|
||||
display_reinit();
|
||||
|
||||
#if defined TREZOR_MODEL_T
|
||||
display_set_little_endian();
|
||||
#endif
|
||||
@ -285,7 +287,6 @@ int main(void) {
|
||||
#endif
|
||||
|
||||
#if defined TREZOR_MODEL_R
|
||||
display_init();
|
||||
button_init();
|
||||
rgb_led_init();
|
||||
#endif
|
||||
@ -296,6 +297,8 @@ int main(void) {
|
||||
check_bootloader_version();
|
||||
#endif
|
||||
|
||||
display_clear();
|
||||
|
||||
// was there reboot with request to stay in bootloader?
|
||||
secbool stay_in_bootloader = secfalse;
|
||||
if (stay_in_bootloader_flag == STAY_IN_BOOTLOADER_FLAG) {
|
||||
|
@ -42,6 +42,7 @@ int display_get_orientation(void);
|
||||
int display_backlight(int val);
|
||||
|
||||
void display_init(void);
|
||||
void display_reinit(void);
|
||||
void display_refresh(void);
|
||||
const char *display_save(const char *prefix);
|
||||
void display_clear_save(void);
|
||||
|
@ -108,26 +108,24 @@ int main(void) {
|
||||
SCB->SHCSR |= (SCB_SHCSR_USGFAULTENA_Msk | SCB_SHCSR_BUSFAULTENA_Msk);
|
||||
#endif
|
||||
|
||||
display_reinit();
|
||||
|
||||
#if defined TREZOR_MODEL_1
|
||||
display_init();
|
||||
display_clear();
|
||||
button_init();
|
||||
#endif
|
||||
|
||||
#if defined TREZOR_MODEL_R
|
||||
display_init();
|
||||
button_init();
|
||||
display_clear();
|
||||
rgb_led_init();
|
||||
#endif
|
||||
|
||||
#if defined TREZOR_MODEL_T
|
||||
touch_init();
|
||||
display_set_little_endian();
|
||||
sdcard_init();
|
||||
display_clear();
|
||||
#endif
|
||||
|
||||
display_clear();
|
||||
|
||||
#if !defined TREZOR_MODEL_1
|
||||
// jump to unprivileged mode
|
||||
// http://infocenter.arm.com/help/topic/com.arm.doc.dui0552a/CHDBIBGJ.html
|
||||
|
@ -378,6 +378,7 @@ int main(void) {
|
||||
sbu_init();
|
||||
usb_init_all();
|
||||
|
||||
display_reinit();
|
||||
display_clear();
|
||||
draw_border(1, 3);
|
||||
|
||||
|
@ -601,6 +601,11 @@ void display_init(void) {
|
||||
display_set_little_endian();
|
||||
}
|
||||
|
||||
void display_reinit(void) {
|
||||
// important for model T as this is not set in boardloader
|
||||
display_set_little_endian();
|
||||
}
|
||||
|
||||
void display_refresh(void) {
|
||||
uint32_t id = display_identify();
|
||||
if (id && (id != DISPLAY_ID_GC9307)) {
|
||||
|
@ -356,6 +356,8 @@ void display_init(void) {
|
||||
display_init_seq();
|
||||
}
|
||||
|
||||
void display_reinit(void) {}
|
||||
|
||||
void display_refresh(void) {}
|
||||
|
||||
const char *display_save(const char *prefix) { return NULL; }
|
||||
|
@ -230,6 +230,10 @@ void display_init(void) {
|
||||
display_refresh();
|
||||
}
|
||||
|
||||
void display_reinit(void){
|
||||
display_init();
|
||||
}
|
||||
|
||||
static inline uint8_t reverse_byte(uint8_t b) {
|
||||
b = (b & 0xF0) >> 4 | (b & 0x0F) << 4;
|
||||
b = (b & 0xCC) >> 2 | (b & 0x33) << 2;
|
||||
|
@ -10,7 +10,7 @@ def add_font(font_name, font, defines, sources):
|
||||
|
||||
|
||||
def configure_board(model, env, defines, sources):
|
||||
model_r_version = 3
|
||||
model_r_version = 4
|
||||
|
||||
if model in ('1',):
|
||||
board = 'trezor_1.h'
|
||||
|
Loading…
Reference in New Issue
Block a user