1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-22 22:38:08 +00:00

refactor(core): define USE_xxx consistently with feature flags

[no changelog]
This commit is contained in:
cepetr 2024-11-15 10:07:00 +01:00 committed by cepetr
parent 7fc226258e
commit 82bc0ef186
14 changed files with 45 additions and 49 deletions

View File

@ -119,7 +119,6 @@ static bool detect_properties(unit_properties_t* props) {
break; break;
} }
#ifdef USE_SD_CARD
props->sd_hotswap_enabled = true; props->sd_hotswap_enabled = true;
#ifdef TREZOR_MODEL_T #ifdef TREZOR_MODEL_T
// Early produced TTs have a HW bug that prevents hotswapping of the SD card, // Early produced TTs have a HW bug that prevents hotswapping of the SD card,
@ -129,7 +128,6 @@ static bool detect_properties(unit_properties_t* props) {
if (production_year <= 18) { if (production_year <= 18) {
props->sd_hotswap_enabled = false; props->sd_hotswap_enabled = false;
} }
#endif
#endif #endif
return true; return true;

View File

@ -46,11 +46,9 @@ bool unit_properties_init(void) {
memset(drv, 0, sizeof(unit_properties_driver_t)); memset(drv, 0, sizeof(unit_properties_driver_t));
#ifdef USE_SD_CARD
drv->cache.sd_hotswap_enabled = true; drv->cache.sd_hotswap_enabled = true;
#ifdef TREZOR_MODEL_T #ifdef TREZOR_MODEL_T
drv->cache.sd_hotswap_enabled = false; drv->cache.sd_hotswap_enabled = false;
#endif
#endif #endif
// Properties detection is not fully implemented for emulator. // Properties detection is not fully implemented for emulator.