diff options
| author | Emil Fresk <emil.fresk@gmail.com> | 2023-02-22 19:59:50 +0100 |
|---|---|---|
| committer | Henrik Tjäder <henrik@tjaders.com> | 2023-03-01 00:35:21 +0100 |
| commit | 1c26eb722f7911737b7973982563a12bc3fb4164 (patch) | |
| tree | f41f1945f1d327c2d3f55aa57b1f849b037ab2f6 /rtic-macros | |
| parent | d82f57772459d9bf12bb2c935e3ebc9b93368f51 (diff) | |
Add template for bindings
Diffstat (limited to 'rtic-macros')
| -rw-r--r-- | rtic-macros/src/codegen/bindings.rs | 4 | ||||
| -rw-r--r-- | rtic-macros/src/codegen/bindings/template.rs | 44 |
2 files changed, 46 insertions, 2 deletions
diff --git a/rtic-macros/src/codegen/bindings.rs b/rtic-macros/src/codegen/bindings.rs index 68378b5..6c214cd 100644 --- a/rtic-macros/src/codegen/bindings.rs +++ b/rtic-macros/src/codegen/bindings.rs @@ -1,7 +1,7 @@ #[cfg(not(any( feature = "cortex-m-source-masking", feature = "cortex-m-basepri", - feaute = "test-template" + feature = "test-template" )))] compile_error!("No backend selected"); @@ -9,7 +9,7 @@ compile_error!("No backend selected"); pub use cortex::*; #[cfg(feature = "test-template")] -pub use cortex::*; +pub use template::*; #[cfg(any(feature = "cortex-m-source-masking", feature = "cortex-m-basepri"))] mod cortex; diff --git a/rtic-macros/src/codegen/bindings/template.rs b/rtic-macros/src/codegen/bindings/template.rs new file mode 100644 index 0000000..18f88fe --- /dev/null +++ b/rtic-macros/src/codegen/bindings/template.rs @@ -0,0 +1,44 @@ +use crate::{ + analyze::Analysis as CodegenAnalysis, + syntax::{analyze::Analysis as SyntaxAnalysis, ast::App}, +}; +use proc_macro2::TokenStream as TokenStream2; +use quote::quote; +use syn::{parse, Attribute, Ident}; + +pub fn impl_mutex( + _app: &App, + _analysis: &CodegenAnalysis, + _cfgs: &[Attribute], + _resources_prefix: bool, + _name: &Ident, + _ty: &TokenStream2, + _ceiling: u8, + _ptr: &TokenStream2, +) -> TokenStream2 { + quote!() +} + +pub fn extra_assertions(_app: &App, _analysis: &SyntaxAnalysis) -> Vec<TokenStream2> { + vec![] +} + +pub fn pre_init_checks(_app: &App, _analysis: &SyntaxAnalysis) -> Vec<TokenStream2> { + vec![] +} + +pub fn pre_init_enable_interrupts(_app: &App, _analysis: &CodegenAnalysis) -> Vec<TokenStream2> { + vec![] +} + +pub fn architecture_specific_analysis(_app: &App, _analysis: &SyntaxAnalysis) -> parse::Result<()> { + Ok(()) +} + +pub fn interrupt_entry(_app: &App, _analysis: &CodegenAnalysis) -> Vec<TokenStream2> { + vec![] +} + +pub fn interrupt_exit(_app: &App, _analysis: &CodegenAnalysis) -> Vec<TokenStream2> { + vec![] +} |
