diff options
author | 2023-02-19 14:30:49 +0100 | |
---|---|---|
committer | 2023-03-01 00:35:20 +0100 | |
commit | b9e0f36aff96ec4e39cf4f728777cbc808df2c78 (patch) | |
tree | 16e4e92c32d1bf9a9ec70d35d950bcf149b7eafd /rtic-macros/src/codegen/bindings.rs | |
parent | 60f0342b697cdddbab9c0e8c6d772bc7aab9de38 (diff) | |
download | rtic-b9e0f36aff96ec4e39cf4f728777cbc808df2c78.tar.gz rtic-b9e0f36aff96ec4e39cf4f728777cbc808df2c78.tar.zst rtic-b9e0f36aff96ec4e39cf4f728777cbc808df2c78.zip |
Add feature flags
Diffstat (limited to 'rtic-macros/src/codegen/bindings.rs')
-rw-r--r-- | rtic-macros/src/codegen/bindings.rs | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/rtic-macros/src/codegen/bindings.rs b/rtic-macros/src/codegen/bindings.rs index 1efe0ce0..a187820e 100644 --- a/rtic-macros/src/codegen/bindings.rs +++ b/rtic-macros/src/codegen/bindings.rs @@ -1,5 +1,18 @@ -// TODO: Feature gate -mod cortex; +#[cfg(not(any( + 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"))] +pub use cortex::*; -// TODO: Feature gate +#[cfg(feature = "test_template")] pub use cortex::*; + +#[cfg(any(feature = "cortex_m_source_masking", feature = "cortex_m_basepri"))] +mod cortex; + +#[cfg(feature = "test_template")] +mod template; |