File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change
1
+ use crate :: codegen:: util;
1
2
use crate :: syntax:: { ast:: App , Context } ;
2
3
use crate :: {
3
4
analyze:: Analysis ,
@@ -23,9 +24,12 @@ pub fn codegen(app: &App, analysis: &Analysis) -> TokenStream2 {
23
24
let entry_stmts = interrupt_entry ( app, analysis) ;
24
25
let exit_stmts = interrupt_exit ( app, analysis) ;
25
26
let config = handler_config ( app, analysis, symbol. clone ( ) ) ;
26
-
27
+
27
28
if let Some ( trampoline) = & task. args . trampoline {
28
29
let trampoline_symbol = trampoline. clone ( ) ;
30
+ let trampoline_config = handler_config ( app, analysis, trampoline_symbol. clone ( ) ) ;
31
+ let rt_err = util:: rt_err_ident ( ) ;
32
+
29
33
mod_app. push ( quote ! (
30
34
31
35
#[ allow( non_snake_case) ]
@@ -34,14 +38,17 @@ pub fn codegen(app: &App, analysis: &Analysis) -> TokenStream2 {
34
38
#( #cfgs) *
35
39
#( #config) *
36
40
unsafe fn #symbol( ) {
37
- rtic:: export:: pend( rtic:: export:: Interrupt :: #trampoline_symbol) ;
41
+ info!( "Pend trampoline" ) ;
42
+ use #rt_err:: Interrupt ;
43
+ rtic:: pend( Interrupt :: #trampoline_symbol) ;
44
+ info!( "Exit trampoline handler" ) ;
38
45
}
39
46
40
47
#[ allow( non_snake_case) ]
41
48
#[ no_mangle]
42
49
#( #attrs) *
43
50
#( #cfgs) *
44
- #( #config ) *
51
+ #( #trampoline_config ) *
45
52
unsafe fn #trampoline_symbol( ) {
46
53
#( #entry_stmts) *
47
54
You can’t perform that action at this time.
0 commit comments