Skip to content

Commit 4e40dc7

Browse files
authored
Merge pull request #154 from LedgerHQ/y333/apex_p_porting
Y333/apex p porting
2 parents c9189e3 + 8b87fd4 commit 4e40dc7

File tree

44 files changed

+20
-11
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+20
-11
lines changed

Cargo.lock

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[package]
22
name = "app-boilerplate-rust"
3-
version = "1.7.3"
3+
version = "1.7.4"
44
authors = ["Ledger"]
55
edition = "2021"
66

77
[dependencies]
8-
ledger_device_sdk = "1.24.7"
8+
ledger_device_sdk = "1.24.8"
99
include_gif = "1.2.4"
1010
serde = { version="1.0.192", default-features = false, features = ["derive"] }
1111
serde-json-core = { git = "https://github.com/rust-embedded-community/serde-json-core" }
@@ -41,5 +41,8 @@ icon = "icons/crab_32x32.gif"
4141
[package.metadata.ledger.flex]
4242
icon = "icons/crab_40x40.gif"
4343

44+
[package.metadata.ledger.apex_p]
45+
icon = "icons/crab_32x32.png"
46+
4447
[lints.rust]
45-
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(target_os, values("stax", "flex", "nanos", "nanox", "nanosplus"))'] }
48+
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(target_os, values("apex_p", "stax", "flex", "nanos", "nanox", "nanosplus"))'] }

glyphs/crab_48x48.png

360 Bytes

icons/crab_32x32.png

291 Bytes

ledger_app.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[app]
22
build_directory = "./"
33
sdk = "Rust"
4-
devices = ["nanox", "nanos+", "stax", "flex"]
4+
devices = ["nanox", "nanos+", "stax", "flex", "apex_p"]
55

66
[tests]
77
pytest_directory = "./tests/"

src/app_ui/address.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ pub fn ui_display_pk(addr: &[u8]) -> Result<bool, AppSW> {
3030
hex::encode(&addr[addr.len() - DISPLAY_ADDR_BYTES_LEN..]).to_uppercase()
3131
);
3232

33-
// Load glyph from 64x64 4bpp gif file with include_gif macro. Creates an NBGL compatible glyph.
33+
// Load glyph from file with include_gif macro. Creates an NBGL compatible glyph.
34+
#[cfg(target_os = "apex_p")]
35+
const FERRIS: NbglGlyph = NbglGlyph::from_include(include_gif!("glyphs/crab_48x48.png", NBGL));
3436
#[cfg(any(target_os = "stax", target_os = "flex"))]
3537
const FERRIS: NbglGlyph = NbglGlyph::from_include(include_gif!("glyphs/crab_64x64.gif", NBGL));
3638
#[cfg(any(target_os = "nanosplus", target_os = "nanox"))]

src/app_ui/menu.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ use ledger_device_sdk::nbgl::{NbglGlyph, NbglHomeAndSettings};
2323

2424
pub fn ui_menu_main(_: &mut Comm) -> NbglHomeAndSettings {
2525
// Load glyph from 64x64 4bpp gif file with include_gif macro. Creates an NBGL compatible glyph.
26+
#[cfg(target_os = "apex_p")]
27+
const FERRIS: NbglGlyph = NbglGlyph::from_include(include_gif!("glyphs/crab_48x48.png", NBGL));
2628
#[cfg(any(target_os = "stax", target_os = "flex"))]
2729
const FERRIS: NbglGlyph = NbglGlyph::from_include(include_gif!("glyphs/crab_64x64.gif", NBGL));
2830
#[cfg(any(target_os = "nanosplus", target_os = "nanox"))]

src/app_ui/sign.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ pub fn ui_display_tx(tx: &Tx) -> Result<bool, AppSW> {
5252

5353
// Create transaction review
5454

55-
// Load glyph from 64x64 4bpp gif file with include_gif macro. Creates an NBGL compatible glyph.
55+
// Load glyph from file with include_gif macro. Creates an NBGL compatible glyph.
56+
#[cfg(target_os = "apex_p")]
57+
const FERRIS: NbglGlyph = NbglGlyph::from_include(include_gif!("glyphs/crab_48x48.png", NBGL));
5658
#[cfg(any(target_os = "stax", target_os = "flex"))]
5759
const FERRIS: NbglGlyph = NbglGlyph::from_include(include_gif!("glyphs/crab_64x64.gif", NBGL));
5860
#[cfg(any(target_os = "nanosplus", target_os = "nanox"))]
3.37 KB
2.83 KB

0 commit comments

Comments
 (0)