diff options
author | 2022-12-14 21:26:40 +0100 | |
---|---|---|
committer | 2022-12-14 21:28:29 +0100 | |
commit | d6edeb6a64077df2161bf55d5abdba536799885c (patch) | |
tree | 535261445044d5d04119f0ca6e55dbbef3c896f6 | |
parent | 9afb1f888f272a29a0bc525809a15570f8c93dc6 (diff) | |
download | rtic-d6edeb6a64077df2161bf55d5abdba536799885c.tar.gz rtic-d6edeb6a64077df2161bf55d5abdba536799885c.tar.zst rtic-d6edeb6a64077df2161bf55d5abdba536799885c.zip |
Fix CI error caused by `critical-section` 0.2.8
-rw-r--r-- | Cargo.toml | 7 | ||||
-rw-r--r-- | macros/src/codegen/shared_resources.rs | 1 | ||||
-rw-r--r-- | xtask/src/command.rs | 10 |
3 files changed, 17 insertions, 1 deletions
@@ -70,3 +70,10 @@ overflow-checks = false [patch.crates-io] lm3s6965 = { git = "https://github.com/japaric/lm3s6965" } + +[features] +test-critical-section = ["cortex-m/critical-section-single-core"] + +[[example]] +name = "pool" +required-features = ["test-critical-section"] diff --git a/macros/src/codegen/shared_resources.rs b/macros/src/codegen/shared_resources.rs index 4a750070..b5dff09d 100644 --- a/macros/src/codegen/shared_resources.rs +++ b/macros/src/codegen/shared_resources.rs @@ -147,6 +147,7 @@ pub fn codegen( None } })) { + #[allow(clippy::or_fun_call)] let v = prio_to_masks.entry(priority - 1).or_insert(Vec::new()); v.push(quote!(#device::Interrupt::#name as u32)); mask_ids.push(quote!(#device::Interrupt::#name as u32)); diff --git a/xtask/src/command.rs b/xtask/src/command.rs index 2f719bf5..100888c0 100644 --- a/xtask/src/command.rs +++ b/xtask/src/command.rs @@ -46,7 +46,15 @@ impl<'a> CargoCommand<'a> { features, mode, } => { - let mut args = vec![self.name(), "--example", example, "--target", target]; + let mut args = vec![ + self.name(), + "--example", + example, + "--target", + target, + "--features", + "test-critical-section", + ]; if let Some(feature_name) = features { args.extend_from_slice(&["--features", feature_name]); |