mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-19 14:08:11 +00:00
feat(core): add emulator support for T3W1
[no changelog]
This commit is contained in:
parent
335f24e99a
commit
121de394e9
@ -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',
|
||||
@ -789,9 +789,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')
|
||||
|
||||
|
@ -64,6 +64,12 @@
|
||||
#define TOUCH_OFFSET_X 32
|
||||
#define TOUCH_OFFSET_Y 84
|
||||
|
||||
#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
|
||||
@ -286,7 +292,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
|
||||
|
@ -56,7 +56,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
|
||||
|
0
core/embed/unix/common.h
Normal file
0
core/embed/unix/common.h
Normal file
Loading…
Reference in New Issue
Block a user