From da0d08f7b63ae9a1bfa9a188c0a86e8f4d770f27 Mon Sep 17 00:00:00 2001 From: bunnie Date: Sun, 28 Jan 2024 16:38:05 +0800 Subject: [PATCH] fix scalar5 return parsing there isn't an arg0 in the `ScalarMessage` return type but that doesn't mean numbering starts at 1. So the first slot should remain unused if you're not casting a return value to `MessageId` (which is "just" a `usize` but "feels wrong") --- libs/cramium-hal/src/ifram.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/cramium-hal/src/ifram.rs b/libs/cramium-hal/src/ifram.rs index 6d693f648..54407d8da 100644 --- a/libs/cramium-hal/src/ifram.rs +++ b/libs/cramium-hal/src/ifram.rs @@ -61,7 +61,7 @@ impl IframRange { _ => 2, }; match send_message(conn, Message::new_blocking_scalar(0 /* MapIram */, length, bank_code, 0, 0)) { - Ok(Result::Scalar5(maybe_size, maybe_phys_address, _, _, _)) => { + Ok(Result::Scalar5(_, maybe_size, maybe_phys_address, _, _)) => { if maybe_size != 0 && maybe_phys_address != 0 { let mut page_aligned_size = maybe_size / 4096; if maybe_size % 4096 != 0 {