-
-
Notifications
You must be signed in to change notification settings - Fork 671
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
8 changed files
with
98 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#ifndef BOARDS_T3W1_UNIX_H | ||
#define BOARDS_T3W1_UNIX_H | ||
|
||
#define USE_TOUCH 1 | ||
#define USE_SBU 1 | ||
#define USE_RGB_COLORS 1 | ||
#define USE_BACKLIGHT 1 | ||
#define USE_OPTIGA 1 | ||
|
||
#define MAX_DISPLAY_RESX 380 | ||
#define MAX_DISPLAY_RESY 520 | ||
#define DISPLAY_RESX 380 | ||
#define DISPLAY_RESY 520 | ||
#define TREZOR_FONT_BPP 4 | ||
|
||
#define WINDOW_WIDTH 400 | ||
#define WINDOW_HEIGHT 600 | ||
#define TOUCH_OFFSET_X 80 | ||
#define TOUCH_OFFSET_Y 102 | ||
|
||
#define ORIENTATION_NS 1 | ||
|
||
// #define BACKGROUND_FILE "T3W1/background_T3W1.h" | ||
// #define BACKGROUND_NAME background_T3W1_jpg | ||
|
||
#endif // BOARDS_T3W1_UNIX_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
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]: | ||
|
||
features_available: list[str] = [] | ||
board = "T3W1/boards/t3w1-unix.h" | ||
hw_model = get_hw_model_as_number("T3W1") | ||
hw_revision = 0 | ||
mcu = "STM32F427xx" | ||
|
||
defines += ["XFRAMEBUFFER", "DISPLAY_RGB585"] | ||
features_available.append("xframebuffer") | ||
features_available.append("display_rgb565") | ||
|
||
defines += [mcu] | ||
defines += [f'TREZOR_BOARD=\\"{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_available.append("dma2d") | ||
if "new_rendering" in features_wanted: | ||
sources += [ | ||
"embed/trezorhal/unix/dma2d_bitblt.c", | ||
] | ||
else: | ||
sources += ["embed/lib/dma2d_emul.c"] | ||
defines += ["USE_DMA2D"] | ||
|
||
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"] | ||
features_available.append("optiga") | ||
|
||
if "input" in features_wanted: | ||
sources += ["embed/trezorhal/unix/touch.c"] | ||
features_available.append("touch") | ||
|
||
features_available.append("backlight") | ||
|
||
sources += ["embed/trezorhal/stm32f4/layout.c"] | ||
|
||
return features_available |