diff options
| author | Emil Fresk <emil.fresk@gmail.com> | 2023-02-20 20:56:18 +0100 |
|---|---|---|
| committer | Henrik Tjäder <henrik@tjaders.com> | 2023-03-01 00:35:21 +0100 |
| commit | 4442c4692634c90ba60653d42d72f9f259ae1a16 (patch) | |
| tree | 9d9febd21d6caf64011c30404808efb043028181 /rtic-macros | |
| parent | 9552790dcc5c8469c6c297b0277a83d2c145b56b (diff) | |
Update backend features to be more clear
Diffstat (limited to 'rtic-macros')
| -rw-r--r-- | rtic-macros/Cargo.toml | 11 | ||||
| -rw-r--r-- | rtic-macros/src/codegen/bindings.rs | 14 | ||||
| -rw-r--r-- | rtic-macros/src/codegen/bindings/cortex.rs | 8 |
3 files changed, 16 insertions, 17 deletions
diff --git a/rtic-macros/Cargo.toml b/rtic-macros/Cargo.toml index bdc2c12..94aa88b 100644 --- a/rtic-macros/Cargo.toml +++ b/rtic-macros/Cargo.toml @@ -23,16 +23,15 @@ proc-macro = true [features] default = [] -debugprint = [] # list of supported codegen backends -cortex_m_source_masking = [] -cortex_m_basepri = [] -# riscv_clic = [] -# riscv_ch32 = [] +cortex-m-source-masking = [] +cortex-m-basepri = [] +# riscv-clic = [] +# riscv-ch32 = [] # backend API test -test_template = [] +test-template = [] [dependencies] indexmap = "1.9.2" diff --git a/rtic-macros/src/codegen/bindings.rs b/rtic-macros/src/codegen/bindings.rs index a187820..68378b5 100644 --- a/rtic-macros/src/codegen/bindings.rs +++ b/rtic-macros/src/codegen/bindings.rs @@ -1,18 +1,18 @@ #[cfg(not(any( - feature = "cortex_m_source_masking", - feature = "cortex_m_basepri", - feaute = "test_template" + feature = "cortex-m-source-masking", + feature = "cortex-m-basepri", + feaute = "test-template" )))] compile_error!("No backend selected"); -#[cfg(any(feature = "cortex_m_source_masking", feature = "cortex_m_basepri"))] +#[cfg(any(feature = "cortex-m-source-masking", feature = "cortex-m-basepri"))] pub use cortex::*; -#[cfg(feature = "test_template")] +#[cfg(feature = "test-template")] pub use cortex::*; -#[cfg(any(feature = "cortex_m_source_masking", feature = "cortex_m_basepri"))] +#[cfg(any(feature = "cortex-m-source-masking", feature = "cortex-m-basepri"))] mod cortex; -#[cfg(feature = "test_template")] +#[cfg(feature = "test-template")] mod template; diff --git a/rtic-macros/src/codegen/bindings/cortex.rs b/rtic-macros/src/codegen/bindings/cortex.rs index d5eb12e..3f0584c 100644 --- a/rtic-macros/src/codegen/bindings/cortex.rs +++ b/rtic-macros/src/codegen/bindings/cortex.rs @@ -8,9 +8,9 @@ use quote::quote; use std::collections::HashSet; use syn::{parse, Attribute, Ident}; -#[cfg(feature = "cortex_m_basepri")] +#[cfg(feature = "cortex-m-basepri")] pub use basepri::*; -#[cfg(feature = "cortex_m_source_masking")] +#[cfg(feature = "cortex-m-source-masking")] pub use source_masking::*; /// Whether `name` is an exception with configurable priority @@ -30,7 +30,7 @@ fn is_exception(name: &Ident) -> bool { ) } -#[cfg(feature = "cortex_m_source_masking")] +#[cfg(feature = "cortex-m-source-masking")] mod source_masking { use super::*; use std::collections::HashMap; @@ -119,7 +119,7 @@ mod source_masking { } } -#[cfg(feature = "cortex_m_basepri")] +#[cfg(feature = "cortex-m-basepri")] mod basepri { use super::*; |
