From c12db45707dc048f84d7c43403ddc8fb725a5500 Mon Sep 17 00:00:00 2001 From: Sympatron GmbH <35803463+Sympatron@users.noreply.github.com> Date: Fri, 6 Dec 2024 16:15:50 +0100 Subject: [PATCH 1/3] Update cortex-m to 0.7 --- core/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/Cargo.toml b/core/Cargo.toml index 414917a..bc4714a 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -15,7 +15,7 @@ categories = [ license = "MIT OR Apache-2.0" [dependencies] -cortex-m = { version = "0.6.0", optional = true } +cortex-m = { version = "0.7.0", optional = true } [dependencies.defmt] version = "0.3.0" From ba97093a69ba4f88f47e548556b99325cfb5c322 Mon Sep 17 00:00:00 2001 From: Sympatron GmbH <35803463+Sympatron@users.noreply.github.com> Date: Fri, 6 Dec 2024 16:23:04 +0100 Subject: [PATCH 2/3] Make no_std unconditional --- core/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/lib.rs b/core/src/lib.rs index 49ee1bd..e735e3c 100644 --- a/core/src/lib.rs +++ b/core/src/lib.rs @@ -95,7 +95,7 @@ //! implemented by disabling interrupts. The critical sections are very short, a few instructions at //! most, so they should make no difference to most applications. -#![cfg_attr(not(feature = "std"), no_std)] +#![no_std] #![deny(missing_docs)] #![deny(warnings)] From b72402cf80defcc04a1e3f9cf3ce3f07b7a2c2a3 Mon Sep 17 00:00:00 2001 From: Sympatron GmbH <35803463+Sympatron@users.noreply.github.com> Date: Fri, 6 Dec 2024 16:26:39 +0100 Subject: [PATCH 3/3] Remove target_pointer_width = 8 because it is not supported --- core/src/vusize.rs | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/core/src/vusize.rs b/core/src/vusize.rs index f8fa73c..b86e0da 100644 --- a/core/src/vusize.rs +++ b/core/src/vusize.rs @@ -154,19 +154,6 @@ pub fn encoded_len(value: usize) -> usize { } } -/// Get the length of an encoded `usize` for the given value in bytes. -#[cfg(target_pointer_width = "8")] -pub fn encoded_len(value: usize) -> usize { - // I don't think you can have targets with 8 bit pointers in rust, - // but just in case, 0..=127 would fit in one byte, and 128..=255 - // would fit in two. - if (value & 0x80) == 0x80 { - 2 - } else { - 1 - } -} - /// Encode the given usize to the `slice`, using `length` bytes for encoding. /// /// ## Safety