From cc868a31cd9999bd86467463e62cae8eeeb4e9c3 Mon Sep 17 00:00:00 2001 From: 9names <60134748+9names@users.noreply.github.com> Date: Sun, 28 Jul 2024 10:13:26 +1000 Subject: [PATCH] Make portable-atomic optional --- embedded-hal-bus/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/embedded-hal-bus/Cargo.toml b/embedded-hal-bus/Cargo.toml index 0b3d444c..d0ebecf7 100644 --- a/embedded-hal-bus/Cargo.toml +++ b/embedded-hal-bus/Cargo.toml @@ -23,7 +23,7 @@ std = ["alloc"] # that does not natively support atomic CAS. If you enable this, you must also add `portable-atomic` to your crate with # a feature flag such as `unsafe-assume-single-core` or `critical-section` to choose how atomic CAS is implemented. # See https://docs.rs/portable-atomic/1.7.0/portable_atomic/#optional-features for more info. -portable-atomic = [] +portable-atomic = ["dep:portable-atomic"] # Enable `embedded-hal-async` support. async = ["dep:embedded-hal-async"] # Derive `defmt::Format` from `defmt` 0.3 for enums and structs. See https://github.com/knurling-rs/defmt for more info @@ -36,7 +36,7 @@ embedded-hal = { version = "1.0.0", path = "../embedded-hal" } embedded-hal-async = { version = "1.0.0", path = "../embedded-hal-async", optional = true } critical-section = { version = "1.0" } defmt-03 = { package = "defmt", version = "0.3", optional = true } -portable-atomic = {version = "1.3", default-features = false, features = ["require-cas"]} +portable-atomic = {version = "1.3", default-features = false, optional = true, features = ["require-cas"]} [package.metadata.docs.rs] features = ["std", "async"]