diff --git a/CHANGELOG.md b/CHANGELOG.md index c90b7c0b..bc77d936 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ## [Unreleased] - [#710]: Update CI +- [#707]: `defmt-rtt`: Use `atomic-polyfill` - [#706]: Satisfy clippy - [#704]: Release `defmt-macros 0.3.3`, `defmt-print 0.3.3`, `defmt-rtt 0.4.0` - [#703]: `defmt-print`: Update to `clap 4.0`. @@ -27,6 +28,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - [#678]: Satisfy clippy [#710]: https://github.com/knurling-rs/defmt/pull/710 +[#707]: https://github.com/knurling-rs/defmt/pull/707 [#706]: https://github.com/knurling-rs/defmt/pull/706 [#704]: https://github.com/knurling-rs/defmt/pull/704 [#703]: https://github.com/knurling-rs/defmt/pull/703 diff --git a/firmware/defmt-rtt/Cargo.toml b/firmware/defmt-rtt/Cargo.toml index 0b97c3c8..13e7c9cf 100644 --- a/firmware/defmt-rtt/Cargo.toml +++ b/firmware/defmt-rtt/Cargo.toml @@ -11,5 +11,6 @@ repository = "https://github.com/knurling-rs/defmt" version = "0.4.0" [dependencies] +atomic-polyfill = "1" defmt = { version = "0.3", path = "../../defmt" } critical-section = "1.1" diff --git a/firmware/defmt-rtt/src/channel.rs b/firmware/defmt-rtt/src/channel.rs index 552f1e5d..c82be867 100644 --- a/firmware/defmt-rtt/src/channel.rs +++ b/firmware/defmt-rtt/src/channel.rs @@ -1,7 +1,6 @@ -use core::{ - ptr, - sync::atomic::{AtomicUsize, Ordering}, -}; +use core::ptr; + +use atomic_polyfill::{AtomicUsize, Ordering}; use crate::{consts::BUF_SIZE, MODE_BLOCK_IF_FULL, MODE_MASK}; diff --git a/firmware/defmt-rtt/src/lib.rs b/firmware/defmt-rtt/src/lib.rs index c81c4709..69bbcaa5 100644 --- a/firmware/defmt-rtt/src/lib.rs +++ b/firmware/defmt-rtt/src/lib.rs @@ -36,7 +36,7 @@ mod channel; mod consts; -use core::sync::atomic::{AtomicBool, AtomicUsize, Ordering}; +use atomic_polyfill::{AtomicBool, AtomicUsize, Ordering}; use crate::{channel::Channel, consts::BUF_SIZE};