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

docs(core): add docstrings to modtrezorutils constants

[no changelog]
This commit is contained in:
matejcik 2023-09-29 12:25:58 +02:00 committed by matejcik
parent c892d4b0ba
commit d913181079
2 changed files with 27 additions and 0 deletions

View File

@ -288,18 +288,31 @@ STATIC mp_obj_str_t mod_trezorutils_full_name_obj = {
(const byte *)MODEL_FULL_NAME}; (const byte *)MODEL_FULL_NAME};
/// SCM_REVISION: bytes /// SCM_REVISION: bytes
/// """Git commit hash of the firmware."""
/// VERSION_MAJOR: int /// VERSION_MAJOR: int
/// """Major version."""
/// VERSION_MINOR: int /// VERSION_MINOR: int
/// """Minor version."""
/// VERSION_PATCH: int /// VERSION_PATCH: int
/// """Patch version."""
/// USE_SD_CARD: bool /// USE_SD_CARD: bool
/// """Whether the hardware supports SD card."""
/// USE_BACKLIGHT: bool /// USE_BACKLIGHT: bool
/// """Whether the hardware supports backlight brightness control."""
/// USE_OPTIGA: bool /// USE_OPTIGA: bool
/// """Whether the hardware supports Optiga secure element."""
/// MODEL: str /// MODEL: str
/// """Model name."""
/// MODEL_FULL_NAME: str /// MODEL_FULL_NAME: str
/// """Full name including Trezor prefix."""
/// INTERNAL_MODEL: str /// INTERNAL_MODEL: str
/// """Internal model code."""
/// EMULATOR: bool /// EMULATOR: bool
/// """Whether the firmware is running in the emulator."""
/// BITCOIN_ONLY: bool /// BITCOIN_ONLY: bool
/// """Whether the firmware is Bitcoin-only."""
/// UI_LAYOUT: str /// UI_LAYOUT: str
/// """UI layout identifier ("tt" for model T, "tr" for models One and R)."""
STATIC const mp_rom_map_elem_t mp_module_trezorutils_globals_table[] = { STATIC const mp_rom_map_elem_t mp_module_trezorutils_globals_table[] = {
{MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_trezorutils)}, {MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_trezorutils)},

View File

@ -88,14 +88,28 @@ def bootloader_locked() -> bool | None:
the feature is not supported. the feature is not supported.
""" """
SCM_REVISION: bytes SCM_REVISION: bytes
"""Git commit hash of the firmware."""
VERSION_MAJOR: int VERSION_MAJOR: int
"""Major version."""
VERSION_MINOR: int VERSION_MINOR: int
"""Minor version."""
VERSION_PATCH: int VERSION_PATCH: int
"""Patch version."""
USE_SD_CARD: bool USE_SD_CARD: bool
"""Whether the hardware supports SD card."""
USE_BACKLIGHT: bool USE_BACKLIGHT: bool
"""Whether the hardware supports backlight brightness control."""
USE_OPTIGA: bool USE_OPTIGA: bool
"""Whether the hardware supports Optiga secure element."""
MODEL: str MODEL: str
"""Model name."""
MODEL_FULL_NAME: str
"""Full name including Trezor prefix."""
INTERNAL_MODEL: str INTERNAL_MODEL: str
"""Internal model code."""
EMULATOR: bool EMULATOR: bool
"""Whether the firmware is running in the emulator."""
BITCOIN_ONLY: bool BITCOIN_ONLY: bool
"""Whether the firmware is Bitcoin-only."""
UI_LAYOUT: str UI_LAYOUT: str
"""UI layout identifier ("tt" for model T, "tr" for models One and R)."""