diff --git a/core/SConscript.boardloader b/core/SConscript.boardloader index 9a325b829..184494e7e 100644 --- a/core/SConscript.boardloader +++ b/core/SConscript.boardloader @@ -18,7 +18,7 @@ if TREZOR_MODEL in ('1', ): ) Return() -FEATURES_WANTED = ["sdcard"] +FEATURES_WANTED = ["sd_card"] CCFLAGS_MOD = '' CPPPATH_MOD = [] diff --git a/core/SConscript.firmware b/core/SConscript.firmware index 2e3f85aef..a8dc6b8c5 100644 --- a/core/SConscript.firmware +++ b/core/SConscript.firmware @@ -19,7 +19,7 @@ FEATURE_FLAGS = { "SYSTEM_VIEW": False, } -FEATURES_WANTED = ["input", "sbu", "sdcard", "rgb_led"] +FEATURES_WANTED = ["input", "sbu", "sd_card", "rgb_led"] CCFLAGS_MOD = '' CPPPATH_MOD = [] diff --git a/core/SConscript.prodtest b/core/SConscript.prodtest index 1d25e740f..d2599f0e2 100644 --- a/core/SConscript.prodtest +++ b/core/SConscript.prodtest @@ -6,7 +6,7 @@ import tools TREZOR_MODEL = ARGUMENTS.get('TREZOR_MODEL', 'T') CMAKELISTS = int(ARGUMENTS.get('CMAKELISTS', 0)) -FEATURES_WANTED = ["input", "sbu", "sdcard", "rdb_led"] +FEATURES_WANTED = ["input", "sbu", "sd_card", "rdb_led"] CCFLAGS_MOD = '' CPPPATH_MOD = [] diff --git a/core/SConscript.reflash b/core/SConscript.reflash index 3457e7ded..a0fd20d00 100644 --- a/core/SConscript.reflash +++ b/core/SConscript.reflash @@ -6,7 +6,7 @@ import tools TREZOR_MODEL = ARGUMENTS.get('TREZOR_MODEL', 'T') CMAKELISTS = int(ARGUMENTS.get('CMAKELISTS', 0)) -FEATURES_WANTED = ["input", "sdcard"] +FEATURES_WANTED = ["input", "sd_card"] CCFLAGS_MOD = '' CPPPATH_MOD = [] diff --git a/core/SConscript.unix b/core/SConscript.unix index ecd444b55..52bea0c4b 100644 --- a/core/SConscript.unix +++ b/core/SConscript.unix @@ -686,13 +686,11 @@ def cargo_build(): if DMA2D: features.append('dma2d') - if TREZOR_MODEL in ('T',) : + if TREZOR_MODEL in ('T',): features.append('touch') - if TREZOR_MODEL in ('R') : - features.append('buttons') - if TREZOR_MODEL in ('1') : - features.append('buttons') - + features.append('sd_card') + if TREZOR_MODEL in ('R', '1'): + features.append('button') env.get('ENV')['TREZOR_MODEL'] = TREZOR_MODEL diff --git a/core/embed/rust/Cargo.toml b/core/embed/rust/Cargo.toml index 8ce50f85d..e20f57a17 100644 --- a/core/embed/rust/Cargo.toml +++ b/core/embed/rust/Cargo.toml @@ -17,13 +17,13 @@ dma2d = [] ui_debug = [] ui_bounds = [] bootloader = [] -buttons = [] +button = [] touch = [] clippy = [] jpeg = [] debug = ["ui_debug"] sbu = [] -sdcard = [] +sd_card = [] rgb_led = [] test = ["cc", "glob", "micropython", "protobuf", "ui", "ui_debug", "dma2d", "touch"] diff --git a/core/embed/rust/src/trezorhal/io.rs b/core/embed/rust/src/trezorhal/io.rs index d8aa3aa74..90f9988f5 100644 --- a/core/embed/rust/src/trezorhal/io.rs +++ b/core/embed/rust/src/trezorhal/io.rs @@ -1,6 +1,6 @@ use super::ffi; -#[cfg(feature = "buttons")] +#[cfg(feature = "button")] pub use super::ffi::{BTN_EVT_DOWN, BTN_EVT_UP, BTN_LEFT, BTN_RIGHT}; #[cfg(feature = "touch")] @@ -8,7 +8,7 @@ pub fn io_touch_read() -> u32 { unsafe { ffi::touch_read() } } -#[cfg(feature = "buttons")] +#[cfg(feature = "button")] pub fn io_button_read() -> u32 { unsafe { ffi::button_read() } } diff --git a/core/embed/rust/src/ui/component/base.rs b/core/embed/rust/src/ui/component/base.rs index 1dc0b66f7..de07a4f00 100644 --- a/core/embed/rust/src/ui/component/base.rs +++ b/core/embed/rust/src/ui/component/base.rs @@ -11,7 +11,7 @@ use crate::{ }, }; -#[cfg(feature = "buttons")] +#[cfg(feature = "button")] use crate::ui::event::ButtonEvent; #[cfg(feature = "touch")] use crate::ui::event::TouchEvent; @@ -347,7 +347,7 @@ where #[derive(Copy, Clone, PartialEq, Eq)] pub enum Event<'a> { - #[cfg(feature = "buttons")] + #[cfg(feature = "button")] Button(ButtonEvent), #[cfg(feature = "touch")] Touch(TouchEvent), diff --git a/core/embed/rust/src/ui/layout/obj.rs b/core/embed/rust/src/ui/layout/obj.rs index 4c7d2dc0c..b4314d952 100644 --- a/core/embed/rust/src/ui/layout/obj.rs +++ b/core/embed/rust/src/ui/layout/obj.rs @@ -23,7 +23,7 @@ use crate::{ }, }; -#[cfg(feature = "buttons")] +#[cfg(feature = "button")] use crate::ui::event::ButtonEvent; #[cfg(feature = "touch")] use crate::ui::event::TouchEvent; @@ -400,7 +400,7 @@ extern "C" fn ui_layout_touch_event(_n_args: usize, _args: *const Obj) -> Obj { Obj::const_none() } -#[cfg(feature = "buttons")] +#[cfg(feature = "button")] extern "C" fn ui_layout_button_event(n_args: usize, args: *const Obj) -> Obj { let block = |args: &[Obj], _kwargs: &Map| { if args.len() != 3 { @@ -414,7 +414,7 @@ extern "C" fn ui_layout_button_event(n_args: usize, args: *const Obj) -> Obj { unsafe { util::try_with_args_and_kwargs(n_args, args, &Map::EMPTY, block) } } -#[cfg(not(feature = "buttons"))] +#[cfg(not(feature = "button"))] extern "C" fn ui_layout_button_event(_n_args: usize, _args: *const Obj) -> Obj { Obj::const_none() } diff --git a/core/embed/unix/board-unix.h b/core/embed/unix/board-unix.h index 32fd61a7e..d3048981f 100644 --- a/core/embed/unix/board-unix.h +++ b/core/embed/unix/board-unix.h @@ -3,7 +3,7 @@ #ifdef TREZOR_MODEL_T #define USE_TOUCH 1 -#define USE_SD_CARD 1 +#define USE_SDCARD 1 #define USE_SBU 1 #endif diff --git a/core/site_scons/boards/trezor_1.py b/core/site_scons/boards/trezor_1.py index 1cbc64a57..52bc1cfe4 100644 --- a/core/site_scons/boards/trezor_1.py +++ b/core/site_scons/boards/trezor_1.py @@ -15,7 +15,7 @@ def configure(env, features_wanted, defines, sources): if "input" in features_wanted: sources += ['embed/trezorhal/button.c'] - features_available.append("buttons") + features_available.append("button") env.get('ENV')['TREZOR_BOARD'] = board diff --git a/core/site_scons/boards/trezor_r_v3.py b/core/site_scons/boards/trezor_r_v3.py index f7e6cdcb7..8e4b13a50 100644 --- a/core/site_scons/boards/trezor_r_v3.py +++ b/core/site_scons/boards/trezor_r_v3.py @@ -15,7 +15,7 @@ def configure(env, features_wanted, defines, sources): if "input" in features_wanted: sources += ['embed/trezorhal/button.c'] - features_available.append("buttons") + features_available.append("button") if "rgb_led" in features_wanted: sources += ['embed/trezorhal/rgb_led.c'] diff --git a/core/site_scons/boards/trezor_r_v4.py b/core/site_scons/boards/trezor_r_v4.py index 458d07ee8..ef21bec5d 100644 --- a/core/site_scons/boards/trezor_r_v4.py +++ b/core/site_scons/boards/trezor_r_v4.py @@ -15,7 +15,7 @@ def configure(env, features_wanted, defines, sources): if "input" in features_wanted: sources += ['embed/trezorhal/button.c'] - features_available.append("buttons") + features_available.append("button") if "sbu" in features_wanted: sources += ['embed/trezorhal/sbu.c', ] diff --git a/core/site_scons/boards/trezor_t.py b/core/site_scons/boards/trezor_t.py index 911f30fdd..54617f12d 100644 --- a/core/site_scons/boards/trezor_t.py +++ b/core/site_scons/boards/trezor_t.py @@ -19,11 +19,11 @@ def configure(env, features_wanted, defines, sources): sources += ['embed/trezorhal/touch/ft6x36.c', ] features_available.append("touch") - if "sdcard" in features_wanted: + if "sd_card" in features_wanted: sources += ['embed/trezorhal/sdcard.c', ] sources += ['embed/extmod/modtrezorio/ff.c', ] sources += ['embed/extmod/modtrezorio/ffunicode.c', ] - features_available.append("sdcard") + features_available.append("sd_card") if "sbu" in features_wanted: sources += ['embed/trezorhal/sbu.c', ]