Skip to content

Commit 057d298

Browse files
authored
Merge pull request #55 from romancardenas/master
Use portable-atomic
2 parents 3c9d75c + 902a414 commit 057d298

File tree

5 files changed

+12
-6
lines changed

5 files changed

+12
-6
lines changed

.github/workflows/ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ jobs:
1111
continue-on-error: ${{ matrix.experimental || false }}
1212
strategy:
1313
matrix:
14-
# All generated code should be running on stable now, MRSV is 1.59.0
15-
rust: [nightly, stable, 1.59.0]
14+
# All generated code should be running on stable now, MRSV is 1.60.0
15+
rust: [nightly, stable, 1.60.0]
1616

1717
include:
1818
# Nightly is only for reference and allowed to fail

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
77

88
## [Unreleased]
99

10-
- Use `atomic-polyfill` to allow builds on riscv32imc-unknown-none-elf targets when needed.
10+
- Use `portable-atomic` to allow builds on `riscv32imc-unknown-none-elf`` targets when needed.
1111

1212
## [v0.10.0] - 2023-03-28
1313

Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@ rust-version = "1.59"
1313
[dependencies]
1414
embedded-hal = { version = "0.2.6", features = ["unproven"] }
1515
nb = "1.0.0"
16-
atomic-polyfill = "1.0.2"
1716
riscv = { version = "0.10.1", features = ["critical-section-single-hart"] }
1817
e310x = { version = "0.11.0", features = ["rt", "critical-section"] }
1918

19+
[target.'cfg(not(target_has_atomic = "32"))'.dependencies]
20+
portable-atomic = { version = "1.4", default-features = false, features = ["unsafe-assume-single-core"] }
21+
2022
[features]
2123
g002 = ["e310x/g002"]
2224
virq = []

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This project is developed and maintained by the [RISC-V team][team].
1212

1313
## Minimum Supported Rust Version (MSRV)
1414

15-
This crate is guaranteed to compile on stable Rust 1.59.0 and up. It *might*
15+
This crate is guaranteed to compile on stable Rust 1.60.0 and up. It *might*
1616
compile with older versions but that may change in any new patch release.
1717

1818
## License

src/gpio.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
//! General Purpose I/O
22
3-
use atomic_polyfill::{AtomicU32, Ordering};
43
use core::marker::PhantomData;
54

5+
#[cfg(target_has_atomic = "32")]
6+
use core::sync::atomic::{AtomicU32, Ordering};
7+
#[cfg(not(target_has_atomic = "32"))]
8+
use portable_atomic::{AtomicU32, Ordering};
9+
610
/// GpioExt trait extends the GPIO0 peripheral.
711
pub trait GpioExt {
812
/// The parts to split the GPIO into.

0 commit comments

Comments
 (0)