Skip to content

Commit

Permalink
Merge pull request #54 from romancardenas/master
Browse files Browse the repository at this point in the history
use atomic-polyfill
  • Loading branch information
almindor authored Jun 29, 2023
2 parents 7ed3a7b + 9345570 commit 3c9d75c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,17 @@ jobs:
toolchain: ${{ matrix.rust }}
override: true
- name: Install all Rust targets for ${{ matrix.rust }}
run: rustup target install --toolchain=${{ matrix.rust }} x86_64-unknown-linux-gnu riscv32imac-unknown-none-elf riscv64imac-unknown-none-elf riscv64gc-unknown-none-elf
run: rustup target install --toolchain=${{ matrix.rust }} x86_64-unknown-linux-gnu riscv32imac-unknown-none-elf riscv32imc-unknown-none-elf riscv64imac-unknown-none-elf riscv64gc-unknown-none-elf
- name: Run CI script for riscv32imac-unknown-none-elf under ${{ matrix.rust }}
run: |
cargo check --target riscv32imac-unknown-none-elf
cargo check --target riscv32imac-unknown-none-elf --features g002
cargo check --target riscv32imac-unknown-none-elf --features virq
cargo check --target riscv32imac-unknown-none-elf --features g002,virq
cargo check --target riscv32imc-unknown-none-elf
cargo check --target riscv32imc-unknown-none-elf --features g002
cargo check --target riscv32imc-unknown-none-elf --features virq
cargo check --target riscv32imc-unknown-none-elf --features g002,virq
# On macOS and Windows, we at least make sure that the crate builds and links.
build-other:
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

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

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

### Added
Expand Down
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ rust-version = "1.59"
[dependencies]
embedded-hal = { version = "0.2.6", features = ["unproven"] }
nb = "1.0.0"
atomic-polyfill = "1.0.2"
riscv = { version = "0.10.1", features = ["critical-section-single-hart"] }
e310x = { version = "0.11.0", features = ["rt", "critical-section"] }

Expand Down
2 changes: 1 addition & 1 deletion src/gpio.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! General Purpose I/O

use atomic_polyfill::{AtomicU32, Ordering};
use core::marker::PhantomData;
use core::sync::atomic::{AtomicU32, Ordering};

/// GpioExt trait extends the GPIO0 peripheral.
pub trait GpioExt {
Expand Down

0 comments on commit 3c9d75c

Please sign in to comment.