mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-11-23 20:22:51 +01:00
Add template for bindings
This commit is contained in:
parent
d82f577724
commit
1c26eb722f
2 changed files with 46 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
||||||
#[cfg(not(any(
|
#[cfg(not(any(
|
||||||
feature = "cortex-m-source-masking",
|
feature = "cortex-m-source-masking",
|
||||||
feature = "cortex-m-basepri",
|
feature = "cortex-m-basepri",
|
||||||
feaute = "test-template"
|
feature = "test-template"
|
||||||
)))]
|
)))]
|
||||||
compile_error!("No backend selected");
|
compile_error!("No backend selected");
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ compile_error!("No backend selected");
|
||||||
pub use cortex::*;
|
pub use cortex::*;
|
||||||
|
|
||||||
#[cfg(feature = "test-template")]
|
#[cfg(feature = "test-template")]
|
||||||
pub use cortex::*;
|
pub use template::*;
|
||||||
|
|
||||||
#[cfg(any(feature = "cortex-m-source-masking", feature = "cortex-m-basepri"))]
|
#[cfg(any(feature = "cortex-m-source-masking", feature = "cortex-m-basepri"))]
|
||||||
mod cortex;
|
mod cortex;
|
||||||
|
|
44
rtic-macros/src/codegen/bindings/template.rs
Normal file
44
rtic-macros/src/codegen/bindings/template.rs
Normal file
|
@ -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![]
|
||||||
|
}
|
Loading…
Reference in a new issue