From 2b2208e217a96086696bd6f36cff2a6cd4c4ac9f Mon Sep 17 00:00:00 2001 From: onsdagens Date: Wed, 27 Sep 2023 21:39:35 +0200 Subject: esp32c3 support --- rtic-macros/src/codegen/bindings/cortex.rs | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'rtic-macros/src/codegen/bindings/cortex.rs') diff --git a/rtic-macros/src/codegen/bindings/cortex.rs b/rtic-macros/src/codegen/bindings/cortex.rs index eba2afc..ffa0245 100644 --- a/rtic-macros/src/codegen/bindings/cortex.rs +++ b/rtic-macros/src/codegen/bindings/cortex.rs @@ -3,7 +3,7 @@ use crate::{ codegen::util, syntax::{analyze::Analysis as SyntaxAnalysis, ast::App}, }; -use proc_macro2::TokenStream as TokenStream2; +use proc_macro2::{Span, TokenStream as TokenStream2}; use quote::quote; use std::collections::HashSet; use syn::{parse, Attribute, Ident}; @@ -29,6 +29,10 @@ fn is_exception(name: &Ident) -> bool { | "SysTick" ) } +pub fn interrupt_ident() -> Ident { + let span = Span::call_site(); + Ident::new("interrupt", span) +} #[cfg(feature = "cortex-m-source-masking")] mod source_masking { @@ -323,6 +327,14 @@ pub fn interrupt_exit(_app: &App, _analysis: &CodegenAnalysis) -> Vec Vec { + vec![] +} + pub fn async_prio_limit(app: &App, analysis: &CodegenAnalysis) -> Vec { let max = if let Some(max) = analysis.max_async_prio { quote!(#max) @@ -338,3 +350,10 @@ pub fn async_prio_limit(app: &App, analysis: &CodegenAnalysis) -> Vec Vec { + vec![] +} -- cgit v1.2.3