diff options
author | 2023-09-27 21:39:35 +0200 | |
---|---|---|
committer | 2023-09-27 19:50:13 +0000 | |
commit | 2b2208e217a96086696bd6f36cff2a6cd4c4ac9f (patch) | |
tree | c17d993fd70954663c0f0ffb6b6afed5228f9714 /rtic-macros/src/codegen/async_dispatchers.rs | |
parent | 3b8d787a917a7a39b28bea85ba2b3a86539e0852 (diff) | |
download | rtic-2b2208e217a96086696bd6f36cff2a6cd4c4ac9f.tar.gz rtic-2b2208e217a96086696bd6f36cff2a6cd4c4ac9f.tar.zst rtic-2b2208e217a96086696bd6f36cff2a6cd4c4ac9f.zip |
esp32c3 support
Diffstat (limited to 'rtic-macros/src/codegen/async_dispatchers.rs')
-rw-r--r-- | rtic-macros/src/codegen/async_dispatchers.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/rtic-macros/src/codegen/async_dispatchers.rs b/rtic-macros/src/codegen/async_dispatchers.rs index 289a63b5..54db2b34 100644 --- a/rtic-macros/src/codegen/async_dispatchers.rs +++ b/rtic-macros/src/codegen/async_dispatchers.rs @@ -2,7 +2,7 @@ use crate::syntax::ast::App; use crate::{ analyze::Analysis, codegen::{ - bindings::{interrupt_entry, interrupt_exit}, + bindings::{async_entry, interrupt_entry, interrupt_exit, handler_config}, util, }, }; @@ -67,14 +67,17 @@ pub fn codegen(app: &App, analysis: &Analysis) -> TokenStream2 { let attribute = &interrupts.get(&level).expect("UNREACHABLE").1.attrs; let entry_stmts = interrupt_entry(app, analysis); let exit_stmts = interrupt_exit(app, analysis); - + let async_entry_stmts = async_entry(app, analysis, dispatcher_name.clone()); + let config = handler_config(app,analysis,dispatcher_name.clone()); items.push(quote!( #[allow(non_snake_case)] #[doc = #doc] #[no_mangle] #(#attribute)* + #(#config)* unsafe fn #dispatcher_name() { #(#entry_stmts)* + #(#async_entry_stmts)* /// The priority of this interrupt handler const PRIORITY: u8 = #level; |