parent
eb47a75ea4
commit
40859d9d57
@ -1,33 +0,0 @@
|
||||
#ifndef _BOARD_UNIX_H
|
||||
#define _BOARD_UNIX_H
|
||||
|
||||
#ifdef TREZOR_MODEL_T
|
||||
#define USE_TOUCH 1
|
||||
#define USE_SD_CARD 1
|
||||
#define USE_SBU 1
|
||||
#define USE_RGB_COLORS 1
|
||||
#define USE_BACKLIGHT 1
|
||||
#endif
|
||||
|
||||
#ifdef TREZOR_MODEL_T3T1
|
||||
#define USE_TOUCH 1
|
||||
#define USE_SD_CARD 1
|
||||
#define USE_SBU 1
|
||||
#define USE_RGB_COLORS 1
|
||||
#define USE_BACKLIGHT 1
|
||||
#define USE_OPTIGA 1
|
||||
#endif
|
||||
|
||||
#ifdef TREZOR_MODEL_1
|
||||
#define USE_BUTTON 1
|
||||
#endif
|
||||
|
||||
#ifdef TREZOR_MODEL_R
|
||||
#define USE_BUTTON 1
|
||||
#define USE_SBU 1
|
||||
#define USE_OPTIGA 1
|
||||
#endif
|
||||
|
||||
#include "display-unix.h"
|
||||
|
||||
#endif //_BOARD_UNIX_H
|
@ -0,0 +1,24 @@
|
||||
#ifndef BOARDS_T1B1_UNIX_H
|
||||
#define BOARDS_T1B1_UNIX_H
|
||||
|
||||
#define USE_BUTTON 1
|
||||
|
||||
#define MAX_DISPLAY_RESX 128
|
||||
#define MAX_DISPLAY_RESY 64
|
||||
#define DISPLAY_RESX 128
|
||||
#define DISPLAY_RESY 64
|
||||
#define TREZOR_FONT_BPP 1
|
||||
|
||||
#define WINDOW_WIDTH 200
|
||||
#define WINDOW_HEIGHT 340
|
||||
#define TOUCH_OFFSET_X 36
|
||||
#define TOUCH_OFFSET_Y 92
|
||||
|
||||
#define ORIENTATION_NS 1
|
||||
|
||||
#define BACKGROUND_FILE "background_1.h"
|
||||
#define BACKGROUND_NAME background_1_jpg
|
||||
|
||||
#include "display-unix.h"
|
||||
|
||||
#endif // BOARDS_T1B1_UNIX_H
|
@ -0,0 +1,26 @@
|
||||
#ifndef BOARDS_T2B1_UNIX_H
|
||||
#define BOARDS_T2B1_UNIX_H
|
||||
|
||||
#define USE_BUTTON 1
|
||||
#define USE_SBU 1
|
||||
#define USE_OPTIGA 1
|
||||
|
||||
#define MAX_DISPLAY_RESX 128
|
||||
#define MAX_DISPLAY_RESY 64
|
||||
#define DISPLAY_RESX 128
|
||||
#define DISPLAY_RESY 64
|
||||
#define TREZOR_FONT_BPP 1
|
||||
|
||||
#define WINDOW_WIDTH 193
|
||||
#define WINDOW_HEIGHT 339
|
||||
#define TOUCH_OFFSET_X 32
|
||||
#define TOUCH_OFFSET_Y 84
|
||||
|
||||
#define ORIENTATION_NS 1
|
||||
|
||||
#define BACKGROUND_FILE "background_T2B1.h"
|
||||
#define BACKGROUND_NAME background_T2B1_jpg
|
||||
|
||||
#include "display-unix.h"
|
||||
|
||||
#endif // BOARDS_T2B1_UNIX_H
|
@ -0,0 +1,41 @@
|
||||
#ifndef BOARDS_T2T1_UNIX_H
|
||||
#define BOARDS_T2T1_UNIX_H
|
||||
|
||||
#define USE_TOUCH 1
|
||||
#define USE_SD_CARD 1
|
||||
#define USE_SBU 1
|
||||
#define USE_RGB_COLORS 1
|
||||
#define USE_BACKLIGHT 1
|
||||
|
||||
// ILI9341V, GC9307 and ST7789V drivers support 240px x 320px display resolution
|
||||
#define MAX_DISPLAY_RESX 240
|
||||
#define MAX_DISPLAY_RESY 320
|
||||
#define DISPLAY_RESX 240
|
||||
#define DISPLAY_RESY 240
|
||||
#define TREZOR_FONT_BPP 4
|
||||
|
||||
#ifdef TREZOR_EMULATOR_RASPI
|
||||
#define WINDOW_WIDTH 480
|
||||
#define WINDOW_HEIGHT 320
|
||||
#define TOUCH_OFFSET_X 110
|
||||
#define TOUCH_OFFSET_Y 40
|
||||
|
||||
#define ORIENTATION_NSEW 1
|
||||
|
||||
#define BACKGROUND_FILE "background_raspi.h"
|
||||
#define BACKGROUND_NAME background_raspi_jpg
|
||||
|
||||
#else
|
||||
#define WINDOW_WIDTH 400
|
||||
#define WINDOW_HEIGHT 600
|
||||
#define TOUCH_OFFSET_X 80
|
||||
#define TOUCH_OFFSET_Y 110
|
||||
|
||||
#define BACKGROUND_FILE "background_T.h"
|
||||
#define BACKGROUND_NAME background_T_jpg
|
||||
|
||||
#endif
|
||||
|
||||
#include "display-unix.h"
|
||||
|
||||
#endif // BOARDS_T2T1_UNIX_H
|
@ -0,0 +1,29 @@
|
||||
#ifndef BOARDS_T3T1_UNIX_H
|
||||
#define BOARDS_T3T1_UNIX_H
|
||||
|
||||
#define USE_TOUCH 1
|
||||
#define USE_SD_CARD 1
|
||||
#define USE_SBU 1
|
||||
#define USE_RGB_COLORS 1
|
||||
#define USE_BACKLIGHT 1
|
||||
#define USE_OPTIGA 1
|
||||
|
||||
#define MAX_DISPLAY_RESX 240
|
||||
#define MAX_DISPLAY_RESY 240
|
||||
#define DISPLAY_RESX 240
|
||||
#define DISPLAY_RESY 240
|
||||
#define TREZOR_FONT_BPP 4
|
||||
|
||||
#define WINDOW_WIDTH 400
|
||||
#define WINDOW_HEIGHT 600
|
||||
#define TOUCH_OFFSET_X 80
|
||||
#define TOUCH_OFFSET_Y 110
|
||||
|
||||
#define ORIENTATION_NSEW 1
|
||||
|
||||
#define BACKGROUND_FILE "background_T.h"
|
||||
#define BACKGROUND_NAME background_T_jpg
|
||||
|
||||
#include "display-unix.h"
|
||||
|
||||
#endif // BOARDS_T3T1_UNIX_H
|
@ -0,0 +1,33 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from .. import get_hw_model_as_number
|
||||
|
||||
|
||||
def configure(
|
||||
env: dict,
|
||||
features_wanted: list[str],
|
||||
defines: list[str | tuple[str, str]],
|
||||
sources: list[str],
|
||||
paths: list[str],
|
||||
) -> list[str]:
|
||||
|
||||
board = "t1b1-unix.h"
|
||||
hw_model = get_hw_model_as_number("T1B1")
|
||||
hw_revision = 0
|
||||
mcu = "STM32F405xx"
|
||||
|
||||
features = []
|
||||
defines += [mcu]
|
||||
defines += [f'TREZOR_BOARD=\\"boards/{board}\\"']
|
||||
defines += [f"HW_MODEL={hw_model}"]
|
||||
defines += [f"HW_REVISION={hw_revision}"]
|
||||
defines += [f"MCU_TYPE={mcu}"]
|
||||
defines += ["FLASH_BIT_ACCESS=1"]
|
||||
defines += ["FLASH_BLOCK_WORDS=1"]
|
||||
|
||||
if "input" in features_wanted:
|
||||
features.append("button")
|
||||
|
||||
sources += ["embed/models/model_T1B1_layout.c"]
|
||||
|
||||
return features
|
@ -0,0 +1,42 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from .. import get_hw_model_as_number
|
||||
|
||||
|
||||
def configure(
|
||||
env: dict,
|
||||
features_wanted: list[str],
|
||||
defines: list[str | tuple[str, str]],
|
||||
sources: list[str],
|
||||
paths: list[str],
|
||||
) -> list[str]:
|
||||
|
||||
board = "t2b1-unix.h"
|
||||
hw_model = get_hw_model_as_number("T2B1")
|
||||
hw_revision = 0
|
||||
mcu = "STM32F427xx"
|
||||
|
||||
features = []
|
||||
defines += [mcu]
|
||||
defines += [f'TREZOR_BOARD=\\"boards/{board}\\"']
|
||||
defines += [f"HW_MODEL={hw_model}"]
|
||||
defines += [f"HW_REVISION={hw_revision}"]
|
||||
defines += [f"MCU_TYPE={mcu}"]
|
||||
defines += ["FLASH_BIT_ACCESS=1"]
|
||||
defines += ["FLASH_BLOCK_WORDS=1"]
|
||||
|
||||
if "sbu" in features_wanted:
|
||||
sources += ["embed/trezorhal/unix/sbu.c"]
|
||||
|
||||
if "optiga_hal" in features_wanted:
|
||||
sources += ["embed/trezorhal/unix/optiga_hal.c"]
|
||||
|
||||
if "optiga" in features_wanted:
|
||||
sources += ["embed/trezorhal/unix/optiga.c"]
|
||||
|
||||
if "input" in features_wanted:
|
||||
features.append("button")
|
||||
|
||||
sources += ["embed/models/model_T2B1_layout.c"]
|
||||
|
||||
return features
|
@ -0,0 +1,51 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from .. import get_hw_model_as_number
|
||||
|
||||
|
||||
def configure(
|
||||
env: dict,
|
||||
features_wanted: list[str],
|
||||
defines: list[str | tuple[str, str]],
|
||||
sources: list[str],
|
||||
paths: list[str],
|
||||
) -> list[str]:
|
||||
|
||||
board = "t2t1-unix.h"
|
||||
hw_model = get_hw_model_as_number("T2T1")
|
||||
hw_revision = 0
|
||||
mcu = "STM32F427xx"
|
||||
|
||||
features = []
|
||||
defines += [mcu]
|
||||
defines += [f'TREZOR_BOARD=\\"boards/{board}\\"']
|
||||
defines += [f"HW_MODEL={hw_model}"]
|
||||
defines += [f"HW_REVISION={hw_revision}"]
|
||||
defines += [f"MCU_TYPE={mcu}"]
|
||||
defines += ["FLASH_BIT_ACCESS=1"]
|
||||
defines += ["FLASH_BLOCK_WORDS=1"]
|
||||
|
||||
if "dma2d" in features_wanted:
|
||||
features.append("dma2d")
|
||||
sources += ["embed/lib/dma2d_emul.c"]
|
||||
defines += ["USE_DMA2D"]
|
||||
|
||||
if "sd_card" in features_wanted:
|
||||
features.append("sd_card")
|
||||
sources += [
|
||||
"embed/trezorhal/unix/sdcard.c",
|
||||
"embed/extmod/modtrezorio/ff.c",
|
||||
"embed/extmod/modtrezorio/ffunicode.c",
|
||||
]
|
||||
|
||||
if "sbu" in features_wanted:
|
||||
sources += ["embed/trezorhal/unix/sbu.c"]
|
||||
|
||||
if "input" in features_wanted:
|
||||
features.append("touch")
|
||||
|
||||
features.append("backlight")
|
||||
|
||||
sources += ["embed/models/model_T2T1_layout.c"]
|
||||
|
||||
return features
|
@ -0,0 +1,58 @@
|
||||
from __future__ import annotations
|
||||
|
||||
from .. import get_hw_model_as_number
|
||||
|
||||
|
||||
def configure(
|
||||
env: dict,
|
||||
features_wanted: list[str],
|
||||
defines: list[str | tuple[str, str]],
|
||||
sources: list[str],
|
||||
paths: list[str],
|
||||
) -> list[str]:
|
||||
|
||||
board = "t3t1-unix.h"
|
||||
hw_model = get_hw_model_as_number("T3T1")
|
||||
hw_revision = 0
|
||||
mcu = "STM32FU585xx"
|
||||
|
||||
features = []
|
||||
defines += [mcu]
|
||||
defines += [f'TREZOR_BOARD=\\"boards/{board}\\"']
|
||||
defines += [f"HW_MODEL={hw_model}"]
|
||||
defines += [f"HW_REVISION={hw_revision}"]
|
||||
defines += [f"MCU_TYPE={mcu}"]
|
||||
# todo change to blockwise flash when implemented in unix
|
||||
defines += ["FLASH_BIT_ACCESS=1"]
|
||||
defines += ["FLASH_BLOCK_WORDS=1"]
|
||||
|
||||
if "dma2d" in features_wanted:
|
||||
features.append("dma2d")
|
||||
sources += ["embed/lib/dma2d_emul.c"]
|
||||
defines += ["USE_DMA2D"]
|
||||
|
||||
if "sd_card" in features_wanted:
|
||||
features.append("sd_card")
|
||||
sources += [
|
||||
"embed/trezorhal/unix/sdcard.c",
|
||||
"embed/extmod/modtrezorio/ff.c",
|
||||
"embed/extmod/modtrezorio/ffunicode.c",
|
||||
]
|
||||
|
||||
if "sbu" in features_wanted:
|
||||
sources += ["embed/trezorhal/unix/sbu.c"]
|
||||
|
||||
if "optiga_hal" in features_wanted:
|
||||
sources += ["embed/trezorhal/unix/optiga_hal.c"]
|
||||
|
||||
if "optiga" in features_wanted:
|
||||
sources += ["embed/trezorhal/unix/optiga.c"]
|
||||
|
||||
if "input" in features_wanted:
|
||||
features.append("touch")
|
||||
|
||||
features.append("backlight")
|
||||
|
||||
sources += ["embed/models/model_T3T1_layout.c"]
|
||||
|
||||
return features
|
Loading…
Reference in new issue