aboutsummaryrefslogtreecommitdiff
path: root/rtic-macros/src/codegen/bindings.rs
diff options
context:
space:
mode:
authorGravatar Emil Fresk <emil.fresk@gmail.com> 2023-02-19 14:30:49 +0100
committerGravatar Henrik Tjäder <henrik@tjaders.com> 2023-03-01 00:35:20 +0100
commitb9e0f36aff96ec4e39cf4f728777cbc808df2c78 (patch)
tree16e4e92c32d1bf9a9ec70d35d950bcf149b7eafd /rtic-macros/src/codegen/bindings.rs
parent60f0342b697cdddbab9c0e8c6d772bc7aab9de38 (diff)
downloadrtic-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.rs19
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;