From a0ef80baeb6475a6ff133cdc3167eefde33cff60 Mon Sep 17 00:00:00 2001 From: obrusvit Date: Wed, 10 Jan 2024 14:50:28 +0100 Subject: [PATCH] chore: fix problems from CI --- .../embed/extmod/modtrezorio/modtrezorio-sdcard_switcher.h | 6 +++--- core/embed/extmod/modtrezorio/modtrezorio.c | 7 ++++++- legacy/firmware/protob/Makefile | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/core/embed/extmod/modtrezorio/modtrezorio-sdcard_switcher.h b/core/embed/extmod/modtrezorio/modtrezorio-sdcard_switcher.h index 07cd48042a..7d60fc97af 100644 --- a/core/embed/extmod/modtrezorio/modtrezorio-sdcard_switcher.h +++ b/core/embed/extmod/modtrezorio/modtrezorio-sdcard_switcher.h @@ -27,7 +27,7 @@ /// def insert( /// card_sn: int, /// capacity_bytes: int | None = 122_945_536, -/// manuf_id: int | None = 27, +/// manuf_id: int | None = 39, /// ) -> None: /// """ /// Inserts SD card to the emulator. @@ -40,7 +40,7 @@ STATIC mp_obj_t mod_trezorio_sdcard_switcher_insert(size_t n_args, {MP_QSTR_capacity_bytes, MP_ARG_OBJ, {.u_rom_obj = MP_ROM_INT(122945536)}}, - {MP_QSTR_manuf_id, MP_ARG_OBJ, {.u_rom_obj = MP_ROM_INT(27)}}, + {MP_QSTR_manuf_id, MP_ARG_OBJ, {.u_rom_obj = MP_ROM_INT(39)}}, }; mp_arg_val_t vals[MP_ARRAY_SIZE(allowed_args)] = {0}; @@ -60,7 +60,7 @@ STATIC mp_obj_t mod_trezorio_sdcard_switcher_insert(size_t n_args, mp_int_t manuf_id; if (vals[2].u_obj == mp_const_none) { /* manuf_id = mp_obj_get_int(vals[2].u_rom_obj); */ - manuf_id = 27; + manuf_id = 39; } else { manuf_id = mp_obj_get_int(vals[2].u_obj); } diff --git a/core/embed/extmod/modtrezorio/modtrezorio.c b/core/embed/extmod/modtrezorio/modtrezorio.c index 983b93931a..a0e5c14a98 100644 --- a/core/embed/extmod/modtrezorio/modtrezorio.c +++ b/core/embed/extmod/modtrezorio/modtrezorio.c @@ -54,8 +54,10 @@ bool usb_connected_previously = true; #ifdef USE_SD_CARD #include "modtrezorio-fatfs.h" #include "modtrezorio-sdcard.h" +#ifdef TREZOR_EMULATOR #include "modtrezorio-sdcard_switcher.h" #endif +#endif /// package: trezorio.__init__ /// from . import fatfs, sdcard, sdcard_switcher @@ -88,7 +90,10 @@ STATIC const mp_rom_map_elem_t mp_module_trezorio_globals_table[] = { #ifdef USE_SD_CARD {MP_ROM_QSTR(MP_QSTR_fatfs), MP_ROM_PTR(&mod_trezorio_fatfs_module)}, {MP_ROM_QSTR(MP_QSTR_sdcard), MP_ROM_PTR(&mod_trezorio_sdcard_module)}, - {MP_ROM_QSTR(MP_QSTR_sdcard_switcher), MP_ROM_PTR(&mod_trezorio_sdcard_switcher_module)}, +#ifdef TREZOR_EMULATOR + {MP_ROM_QSTR(MP_QSTR_sdcard_switcher), + MP_ROM_PTR(&mod_trezorio_sdcard_switcher_module)}, +#endif #endif #ifdef USE_TOUCH diff --git a/legacy/firmware/protob/Makefile b/legacy/firmware/protob/Makefile index 06129b1d1f..0f5c199ebe 100644 --- a/legacy/firmware/protob/Makefile +++ b/legacy/firmware/protob/Makefile @@ -3,7 +3,7 @@ Q := @ endif SKIPPED_MESSAGES := Binance Cardano DebugMonero Eos Monero Ontology Ripple SdProtect Tezos WebAuthn \ - DebugLinkRecordScreen DebugLinkEraseSdCard DebugLinkWatchLayout \ + DebugLinkRecordScreen DebugLinkEraseSdCard DebugLinkInsertSdCard DebugLinkWatchLayout \ DebugLinkLayout DebugLinkResetDebugEvents GetNonce \ TxAckInput TxAckOutput TxAckPrev TxAckPaymentRequest \ EthereumSignTypedData EthereumTypedDataStructRequest EthereumTypedDataStructAck \