mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-15 20:19:23 +00:00
feat(core): add emulator support for T3W1
[no changelog]
This commit is contained in:
parent
89f710e2f5
commit
6fd82743fd
@ -7,7 +7,7 @@ import tools
|
||||
BITCOIN_ONLY = ARGUMENTS.get('BITCOIN_ONLY', '0')
|
||||
EVERYTHING = BITCOIN_ONLY != '1'
|
||||
TREZOR_MODEL = ARGUMENTS.get('TREZOR_MODEL', 'T')
|
||||
DMA2D = TREZOR_MODEL in ('T', )
|
||||
DMA2D = TREZOR_MODEL in ('T', 'T3W1')
|
||||
CMAKELISTS = int(ARGUMENTS.get('CMAKELISTS', 0))
|
||||
|
||||
if TREZOR_MODEL in ('DISC1', ):
|
||||
@ -174,7 +174,7 @@ if FEATURE_FLAGS["SECP256K1_ZKP"]:
|
||||
SOURCE_MOD += [
|
||||
'embed/extmod/modtrezorio/modtrezorio.c',
|
||||
]
|
||||
if TREZOR_MODEL in ('T',):
|
||||
if TREZOR_MODEL in ('T', 'T3W1'):
|
||||
SOURCE_MOD += [
|
||||
'embed/extmod/modtrezorio/ff.c',
|
||||
'embed/extmod/modtrezorio/ffunicode.c',
|
||||
@ -206,6 +206,10 @@ elif TREZOR_MODEL in ('T', ):
|
||||
SOURCE_MOD += [
|
||||
'embed/models/model_T2T1_layout.c',
|
||||
]
|
||||
elif TREZOR_MODEL in ('T3W1', ):
|
||||
SOURCE_MOD += [
|
||||
'embed/models/model_T3W1_layout.c',
|
||||
]
|
||||
elif TREZOR_MODEL in ('R', ):
|
||||
SOURCE_MOD += [
|
||||
'embed/models/model_T2B1_layout.c',
|
||||
@ -745,7 +749,7 @@ if FROZEN:
|
||||
source=SOURCE_PY,
|
||||
source_dir=SOURCE_PY_DIR,
|
||||
bitcoin_only=BITCOIN_ONLY,
|
||||
backlight=TREZOR_MODEL in ('T',),
|
||||
backlight=TREZOR_MODEL in ('T', 'T3W1'),
|
||||
optiga=TREZOR_MODEL in ('R',),
|
||||
ui_layout=UI_LAYOUT,
|
||||
)
|
||||
@ -792,9 +796,13 @@ def cargo_build():
|
||||
if DMA2D:
|
||||
features.append('dma2d')
|
||||
|
||||
if TREZOR_MODEL in ('T', 'T3W1'):
|
||||
if TREZOR_MODEL in ('T'):
|
||||
features.append('touch')
|
||||
features.append('sd_card')
|
||||
if TREZOR_MODEL in ('T3W1'):
|
||||
features.append('touch')
|
||||
features.append('button')
|
||||
features.append('sd_card')
|
||||
if TREZOR_MODEL in ('R', '1'):
|
||||
features.append('button')
|
||||
|
||||
|
@ -14,6 +14,7 @@
|
||||
#define USE_SD_CARD 1
|
||||
#define USE_SBU 1
|
||||
#define USE_RGB_COLORS 1
|
||||
#define USE_BACKLIGHT 1
|
||||
#endif
|
||||
|
||||
#ifdef TREZOR_MODEL_1
|
||||
|
@ -57,6 +57,11 @@
|
||||
#define TOUCH_OFFSET_X 36
|
||||
#define TOUCH_OFFSET_Y 92
|
||||
|
||||
#elif defined TREZOR_MODEL_T3W1
|
||||
#define WINDOW_WIDTH 400
|
||||
#define WINDOW_HEIGHT 600
|
||||
#define TOUCH_OFFSET_X 80
|
||||
#define TOUCH_OFFSET_Y 110
|
||||
#else
|
||||
#error Unknown Trezor model
|
||||
#endif
|
||||
@ -275,7 +280,8 @@ int display_orientation(int degrees) {
|
||||
if (degrees != DISPLAY_ORIENTATION) {
|
||||
#if defined TREZOR_MODEL_T
|
||||
if (degrees == 0 || degrees == 90 || degrees == 180 || degrees == 270) {
|
||||
#elif defined TREZOR_MODEL_1 || defined TREZOR_MODEL_R
|
||||
#elif defined TREZOR_MODEL_1 || defined TREZOR_MODEL_R || \
|
||||
defined TREZOR_MODEL_T3W1
|
||||
if (degrees == 0 || degrees == 180) {
|
||||
#else
|
||||
#error Unknown Trezor model
|
||||
|
@ -3,6 +3,14 @@
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef TREZOR_MODEL_T3W1
|
||||
#define MAX_DISPLAY_RESX 240
|
||||
#define MAX_DISPLAY_RESY 320
|
||||
#define DISPLAY_RESX 240
|
||||
#define DISPLAY_RESY 320
|
||||
#define TREZOR_FONT_BPP 4
|
||||
#endif
|
||||
|
||||
#ifdef TREZOR_MODEL_T
|
||||
// ILI9341V, GC9307 and ST7789V drivers support 240px x 320px display resolution
|
||||
#define MAX_DISPLAY_RESX 240
|
||||
|
@ -35,7 +35,8 @@
|
||||
#define FLASH_FILE profile_flash_path()
|
||||
#endif
|
||||
|
||||
#if defined TREZOR_MODEL_T || defined TREZOR_MODEL_R
|
||||
#if defined TREZOR_MODEL_T || defined TREZOR_MODEL_R || \
|
||||
defined TREZOR_MODEL_T3W1
|
||||
#define FLASH_SECTOR_COUNT 24
|
||||
#elif defined TREZOR_MODEL_1
|
||||
#define FLASH_SECTOR_COUNT 12
|
||||
@ -56,7 +57,8 @@ static const uint32_t FLASH_SECTOR_TABLE[FLASH_SECTOR_COUNT + 1] = {
|
||||
[9] = 0x080A0000, // - 0x080BFFFF | 128 KiB
|
||||
[10] = 0x080C0000, // - 0x080DFFFF | 128 KiB
|
||||
[11] = 0x080E0000, // - 0x080FFFFF | 128 KiB
|
||||
#if defined TREZOR_MODEL_T || defined TREZOR_MODEL_R
|
||||
#if defined TREZOR_MODEL_T || defined TREZOR_MODEL_R || \
|
||||
defined TREZOR_MODEL_T3W1
|
||||
[12] = 0x08100000, // - 0x08103FFF | 16 KiB
|
||||
[13] = 0x08104000, // - 0x08107FFF | 16 KiB
|
||||
[14] = 0x08108000, // - 0x0810BFFF | 16 KiB
|
||||
|
Loading…
Reference in New Issue
Block a user