From c9a164c52e31387f24e7edd3306dda19bba76005 Mon Sep 17 00:00:00 2001 From: grdddj Date: Fri, 12 May 2023 14:44:20 +0200 Subject: [PATCH] WIP - remove toif feature --- core/embed/rust/Cargo.toml | 3 +-- core/embed/rust/src/ui/layout/util.rs | 15 +++++++-------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/core/embed/rust/Cargo.toml b/core/embed/rust/Cargo.toml index 24c85c3461..2d4d5359a5 100644 --- a/core/embed/rust/Cargo.toml +++ b/core/embed/rust/Cargo.toml @@ -9,7 +9,7 @@ build = "build.rs" default = ["model_tt"] bitcoin_only = [] model_tt = ["jpeg"] -model_tr = ["toif"] +model_tr = [] micropython = [] protobuf = ["micropython"] ui = [] @@ -21,7 +21,6 @@ button = [] touch = [] clippy = [] jpeg = [] -toif = [] disp_i8080_8bit_dw = [] # write pixels directly to peripheral disp_i8080_16bit_dw = [] # write pixels directly to peripheral debug = ["ui_debug"] diff --git a/core/embed/rust/src/ui/layout/util.rs b/core/embed/rust/src/ui/layout/util.rs index 8cb4155463..102d592fd0 100644 --- a/core/embed/rust/src/ui/layout/util.rs +++ b/core/embed/rust/src/ui/layout/util.rs @@ -19,15 +19,15 @@ use crate::{ use cstr_core::cstr; use heapless::Vec; -#[cfg(any(feature = "toif", feature = "jpeg"))] -use crate::micropython::{ - buffer::get_buffer, - ffi::{mp_obj_new_int, mp_obj_new_tuple}, -}; #[cfg(feature = "jpeg")] use crate::ui::display::tjpgd::{jpeg_info, jpeg_test}; -#[cfg(feature = "toif")] -use crate::ui::display::toif::Toif; +use crate::{ + micropython::{ + buffer::get_buffer, + ffi::{mp_obj_new_int, mp_obj_new_tuple}, + }, + ui::display::toif::Toif, +}; pub fn iter_into_objs(iterable: Obj) -> Result<[Obj; N], Error> { let err = Error::ValueError(cstr!("Invalid iterable length")); @@ -251,7 +251,6 @@ pub extern "C" fn upy_jpeg_info(data: Obj) -> Obj { unsafe { try_or_raise(block) } } -#[cfg(feature = "toif")] pub extern "C" fn upy_toif_info(data: Obj) -> Obj { let block = || { let buffer = unsafe { get_buffer(data) };