Skip to content

Commit

Permalink
[Fixes #72] Make critical-section optional for HAL crate
Browse files Browse the repository at this point in the history
  • Loading branch information
michalfita committed Dec 23, 2023
1 parent 6552571 commit a631cc0
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 39 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- id: boards
run: echo "::set-output name=board_matrix::$(ls ./boards --indicator-style=none | jq -ncR '[inputs]')"
- id: features
run: echo "::set-output name=feature_matrix::[\"reconfigurable-system-pins\",\"usart-spi-host-without-select\",\"rt\"]"
run: echo "::set-output name=feature_matrix::[\"reconfigurable-system-pins\",\"usart-spi-host-without-select\",\"rt\",\"critical-section\"]"
outputs:
pac_matrix: ${{ steps.pacs.outputs.pac_matrix }}
board_matrix: ${{ steps.boards.outputs.board_matrix }}
Expand All @@ -39,7 +39,7 @@ jobs:
- name: Install Rust (thumbv7em)
run: rustup target add thumbv7em-none-eabihf
- name: Build HAL for ${{ matrix.pac }}
run: cargo check --package atsamx7x-hal --features ${{ matrix.pac }},unproven
run: cargo check --package atsamx7x-hal --features ${{ matrix.pac }},unproven,rt,critical-section

build-latest:
if: github.event.pull_request.head.repo.full_name != github.repository
Expand All @@ -59,7 +59,7 @@ jobs:
- name: Install Rust (thumbv7em)
run: rustup target add thumbv7em-none-eabihf
- name: Build HAL for ${{ matrix.pac }}
run: cargo check --package atsamx7x-hal --features ${{ matrix.pac }},unproven
run: cargo check --package atsamx7x-hal --features ${{ matrix.pac }},unproven,rt,critical-section

build-features:
if: github.event.pull_request.head.repo.full_name != github.repository
Expand Down Expand Up @@ -146,6 +146,6 @@ jobs:
- name: Install Rust (thumbv7em)
run: rustup target add thumbv7em-none-eabihf
- name: Build HAL documentation
run: cargo doc --package atsamx7x-hal --no-deps --features samv71q21b,unproven,reconfigurable-system-pins,rt
run: cargo doc --package atsamx7x-hal --no-deps --features samv71q21b,unproven,reconfigurable-system-pins,rt,critical-section
- name: Build HAL doc tests
run: cargo test --package atsamx7x-hal --doc --features samv71q21b,unproven,rt --target x86_64-unknown-linux-gnu
run: cargo test --package atsamx7x-hal --doc --features samv71q21b,unproven,rt,critical-section --target x86_64-unknown-linux-gnu
87 changes: 53 additions & 34 deletions hal/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "atsamx7x-hal"
version = "0.4.3-alpha1"
version = "0.4.3-alpha3"
# in no particular order
authors = [
"Michal Fita <[email protected]>",
Expand Down Expand Up @@ -40,39 +40,39 @@ void = { version = "1", default-features = false }
strum = { version = "0.24.1", default-features = false, features = ["derive"]}
cfg-if = "1"
mcan-core = { version = "0.2", optional = true }
atsame70j19b = { version = "0.29.0-alpha3", optional = true, features = ["critical-section"]}
atsame70j20b = { version = "0.29.0-alpha3", optional = true, features = ["critical-section"]}
atsame70j21b = { version = "0.29.0-alpha3", optional = true, features = ["critical-section"]}
atsame70n19b = { version = "0.29.0-alpha3", optional = true, features = ["critical-section"]}
atsame70n20b = { version = "0.29.0-alpha3", optional = true, features = ["critical-section"]}
atsame70n21b = { version = "0.29.0-alpha3", optional = true, features = ["critical-section"]}
atsame70q19b = { version = "0.29.0-alpha3", optional = true, features = ["critical-section"]}
atsame70q20b = { version = "0.29.0-alpha3", optional = true, features = ["critical-section"]}
atsame70q21b = { version = "0.29.0-alpha3", optional = true, features = ["critical-section"]}
atsams70j19b = { version = "0.29.0-alpha3", optional = true, features = ["critical-section"]}
atsams70j20b = { version = "0.29.0-alpha3", optional = true, features = ["critical-section"]}
atsams70j21b = { version = "0.29.0-alpha3", optional = true, features = ["critical-section"]}
atsams70n19b = { version = "0.29.0-alpha3", optional = true, features = ["critical-section"]}
atsams70n20b = { version = "0.29.0-alpha3", optional = true, features = ["critical-section"]}
atsams70n21b = { version = "0.29.0-alpha3", optional = true, features = ["critical-section"]}
atsams70q19b = { version = "0.29.0-alpha3", optional = true, features = ["critical-section"]}
atsams70q20b = { version = "0.29.0-alpha3", optional = true, features = ["critical-section"]}
atsams70q21b = { version = "0.29.0-alpha3", optional = true, features = ["critical-section"]}
atsamv70j19b = { version = "0.29.0-alpha3", optional = true, features = ["critical-section"]}
atsamv70j20b = { version = "0.29.0-alpha3", optional = true, features = ["critical-section"]}
atsamv70n19b = { version = "0.29.0-alpha3", optional = true, features = ["critical-section"]}
atsamv70n20b = { version = "0.29.0-alpha3", optional = true, features = ["critical-section"]}
atsamv70q19b = { version = "0.29.0-alpha3", optional = true, features = ["critical-section"]}
atsamv70q20b = { version = "0.29.0-alpha3", optional = true, features = ["critical-section"]}
atsamv71j19b = { version = "0.29.0-alpha3", optional = true, features = ["critical-section"]}
atsamv71j20b = { version = "0.29.0-alpha3", optional = true, features = ["critical-section"]}
atsamv71j21b = { version = "0.29.0-alpha3", optional = true, features = ["critical-section"]}
atsamv71n19b = { version = "0.29.0-alpha3", optional = true, features = ["critical-section"]}
atsamv71n20b = { version = "0.29.0-alpha3", optional = true, features = ["critical-section"]}
atsamv71n21b = { version = "0.29.0-alpha3", optional = true, features = ["critical-section"]}
atsamv71q19b = { version = "0.29.0-alpha3", optional = true, features = ["critical-section"]}
atsamv71q20b = { version = "0.29.0-alpha3", optional = true, features = ["critical-section"]}
atsamv71q21b = { version = "0.29.0-alpha3", optional = true, features = ["critical-section"]}
atsame70j19b = { version = "0.29.0-alpha3", optional = true }
atsame70j20b = { version = "0.29.0-alpha3", optional = true }
atsame70j21b = { version = "0.29.0-alpha3", optional = true }
atsame70n19b = { version = "0.29.0-alpha3", optional = true }
atsame70n20b = { version = "0.29.0-alpha3", optional = true }
atsame70n21b = { version = "0.29.0-alpha3", optional = true }
atsame70q19b = { version = "0.29.0-alpha3", optional = true }
atsame70q20b = { version = "0.29.0-alpha3", optional = true }
atsame70q21b = { version = "0.29.0-alpha3", optional = true }
atsams70j19b = { version = "0.29.0-alpha3", optional = true }
atsams70j20b = { version = "0.29.0-alpha3", optional = true }
atsams70j21b = { version = "0.29.0-alpha3", optional = true }
atsams70n19b = { version = "0.29.0-alpha3", optional = true }
atsams70n20b = { version = "0.29.0-alpha3", optional = true }
atsams70n21b = { version = "0.29.0-alpha3", optional = true }
atsams70q19b = { version = "0.29.0-alpha3", optional = true }
atsams70q20b = { version = "0.29.0-alpha3", optional = true }
atsams70q21b = { version = "0.29.0-alpha3", optional = true }
atsamv70j19b = { version = "0.29.0-alpha3", optional = true }
atsamv70j20b = { version = "0.29.0-alpha3", optional = true }
atsamv70n19b = { version = "0.29.0-alpha3", optional = true }
atsamv70n20b = { version = "0.29.0-alpha3", optional = true }
atsamv70q19b = { version = "0.29.0-alpha3", optional = true }
atsamv70q20b = { version = "0.29.0-alpha3", optional = true }
atsamv71j19b = { version = "0.29.0-alpha3", optional = true }
atsamv71j20b = { version = "0.29.0-alpha3", optional = true }
atsamv71j21b = { version = "0.29.0-alpha3", optional = true }
atsamv71n19b = { version = "0.29.0-alpha3", optional = true }
atsamv71n20b = { version = "0.29.0-alpha3", optional = true }
atsamv71n21b = { version = "0.29.0-alpha3", optional = true }
atsamv71q19b = { version = "0.29.0-alpha3", optional = true }
atsamv71q20b = { version = "0.29.0-alpha3", optional = true }
atsamv71q21b = { version = "0.29.0-alpha3", optional = true }

[patch.crates-io]
atsame70j19b = { path = "../../atsamx7x-pac/pac/atsame70j19b" }
Expand Down Expand Up @@ -180,6 +180,25 @@ rt = ["atsame70j19b?/rt", "atsame70j20b?/rt", "atsame70j21b?/rt",
"atsamv71n19b?/rt", "atsamv71n20b?/rt", "atsamv71n21b?/rt",
"atsamv71q19b?/rt", "atsamv71q20b?/rt", "atsamv71q21b?/rt"]

critical-section = [
"atsame70j19b?/critical-section", "atsame70j20b?/critical-section",
"atsame70j21b?/critical-section", "atsame70n19b?/critical-section",
"atsame70n20b?/critical-section", "atsame70n21b?/critical-section",
"atsame70q19b?/critical-section", "atsame70q20b?/critical-section",
"atsame70q21b?/critical-section", "atsams70j19b?/critical-section",
"atsams70j20b?/critical-section", "atsams70j21b?/critical-section",
"atsams70n19b?/critical-section", "atsams70n20b?/critical-section",
"atsams70n21b?/critical-section", "atsams70q19b?/critical-section",
"atsams70q20b?/critical-section", "atsams70q21b?/critical-section",
"atsamv70j19b?/critical-section", "atsamv70j20b?/critical-section",
"atsamv70n19b?/critical-section", "atsamv70n20b?/critical-section",
"atsamv70q19b?/critical-section", "atsamv70q20b?/critical-section",
"atsamv71j19b?/critical-section", "atsamv71j20b?/critical-section",
"atsamv71j21b?/critical-section", "atsamv71n19b?/critical-section",
"atsamv71n20b?/critical-section", "atsamv71n21b?/critical-section",
"atsamv71q19b?/critical-section", "atsamv71q20b?/critical-section",
"atsamv71q21b?/critical-section"]


[package.metadata.docs.rs]
# docs.rs build target
Expand Down

0 comments on commit a631cc0

Please sign in to comment.