1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-18 12:28:09 +00:00

feat(core): Add utils.USE_OPTIGA.

This commit is contained in:
Andrew Kozlik 2023-08-23 10:00:41 +02:00 committed by Andrew Kozlik
parent 2dc5857336
commit 8010cfb5b6
3 changed files with 8 additions and 0 deletions

View File

@ -263,6 +263,7 @@ STATIC mp_obj_str_t mod_trezorutils_revision_obj = {
/// VERSION_PATCH: int /// VERSION_PATCH: int
/// USE_SD_CARD: bool /// USE_SD_CARD: bool
/// USE_BACKLIGHT: bool /// USE_BACKLIGHT: bool
/// USE_OPTIGA: bool
/// MODEL: str /// MODEL: str
/// INTERNAL_MODEL: str /// INTERNAL_MODEL: str
/// EMULATOR: bool /// EMULATOR: bool
@ -298,6 +299,11 @@ STATIC const mp_rom_map_elem_t mp_module_trezorutils_globals_table[] = {
{MP_ROM_QSTR(MP_QSTR_USE_BACKLIGHT), mp_const_true}, {MP_ROM_QSTR(MP_QSTR_USE_BACKLIGHT), mp_const_true},
#else #else
{MP_ROM_QSTR(MP_QSTR_USE_BACKLIGHT), mp_const_false}, {MP_ROM_QSTR(MP_QSTR_USE_BACKLIGHT), mp_const_false},
#endif
#ifdef USE_OPTIGA
{MP_ROM_QSTR(MP_QSTR_USE_OPTIGA), mp_const_true},
#else
{MP_ROM_QSTR(MP_QSTR_USE_OPTIGA), mp_const_false},
#endif #endif
{MP_ROM_QSTR(MP_QSTR_MODEL), MP_ROM_QSTR(MODEL_NAME_QSTR)}, {MP_ROM_QSTR(MP_QSTR_MODEL), MP_ROM_QSTR(MODEL_NAME_QSTR)},
{MP_ROM_QSTR(MP_QSTR_INTERNAL_MODEL), {MP_ROM_QSTR(MP_QSTR_INTERNAL_MODEL),

View File

@ -85,6 +85,7 @@ VERSION_MINOR: int
VERSION_PATCH: int VERSION_PATCH: int
USE_SD_CARD: bool USE_SD_CARD: bool
USE_BACKLIGHT: bool USE_BACKLIGHT: bool
USE_OPTIGA: bool
MODEL: str MODEL: str
INTERNAL_MODEL: str INTERNAL_MODEL: str
EMULATOR: bool EMULATOR: bool

View File

@ -7,6 +7,7 @@ from trezorutils import ( # noqa: F401
MODEL, MODEL,
SCM_REVISION, SCM_REVISION,
USE_BACKLIGHT, USE_BACKLIGHT,
USE_OPTIGA,
USE_SD_CARD, USE_SD_CARD,
VERSION_MAJOR, VERSION_MAJOR,
VERSION_MINOR, VERSION_MINOR,