Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use atomic_polyfill on targets without atomics #707

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions firmware/defmt-rtt/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
7 changes: 3 additions & 4 deletions firmware/defmt-rtt/src/channel.rs
Original file line number Diff line number Diff line change
@@ -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};

Expand Down
2 changes: 1 addition & 1 deletion firmware/defmt-rtt/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};

Expand Down