From 96d73640f282b80d1656bb50eecaec236ff42822 Mon Sep 17 00:00:00 2001 From: James Munns Date: Fri, 17 Dec 2021 15:20:20 +0100 Subject: [PATCH 1/2] Add optional defmt dependency --- core/Cargo.toml | 7 ++++++- core/src/lib.rs | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/core/Cargo.toml b/core/Cargo.toml index c1f2044..414917a 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bbqueue" -version = "0.5.0" +version = "0.5.1" description = "A SPSC, lockless, no_std, thread safe, queue, based on BipBuffers" repository = "/~https://github.com/jamesmunns/bbqueue" authors = ["James Munns "] @@ -17,8 +17,13 @@ license = "MIT OR Apache-2.0" [dependencies] cortex-m = { version = "0.6.0", optional = true } +[dependencies.defmt] +version = "0.3.0" +optional = true + [features] thumbv6 = ["cortex-m"] +defmt_0_3 = ["defmt"] [package.metadata.docs.rs] all-features = true diff --git a/core/src/lib.rs b/core/src/lib.rs index ea2348d..49ee1bd 100644 --- a/core/src/lib.rs +++ b/core/src/lib.rs @@ -112,6 +112,7 @@ pub type Result = CoreResult; /// Error type used by the `BBQueue` interfaces #[derive(Debug, PartialEq, Eq, Copy, Clone)] +#[cfg_attr(feature = "defmt_0_3", derive(defmt::Format))] pub enum Error { /// The buffer does not contain sufficient size for the requested action InsufficientSize, From c02ef7ec97e2d9736eda0aaee3d26ca582ebae84 Mon Sep 17 00:00:00 2001 From: Wilfried Chauveau Date: Tue, 12 Jul 2022 15:07:29 +0100 Subject: [PATCH 2/2] Bump to cortex-m 0.7.0 --- 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"