diff options
author | 2020-12-03 21:04:06 +0100 | |
---|---|---|
committer | 2020-12-03 21:04:06 +0100 | |
commit | ef50aeb2e8245b69843280fabb62589c0716ffdd (patch) | |
tree | a159de70654135eb87c52629c6026766eac3bff0 /macros/src/codegen/post_init.rs | |
parent | 3b4c10e790e63ac328a7bdb98451ac11d5935731 (diff) | |
download | rtic-ef50aeb2e8245b69843280fabb62589c0716ffdd.tar.gz rtic-ef50aeb2e8245b69843280fabb62589c0716ffdd.tar.zst rtic-ef50aeb2e8245b69843280fabb62589c0716ffdd.zip |
Save, init generation fixed
Diffstat (limited to 'macros/src/codegen/post_init.rs')
-rw-r--r-- | macros/src/codegen/post_init.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/macros/src/codegen/post_init.rs b/macros/src/codegen/post_init.rs index 5545944d..9174daeb 100644 --- a/macros/src/codegen/post_init.rs +++ b/macros/src/codegen/post_init.rs @@ -25,6 +25,9 @@ pub fn codegen(app: &App, analysis: &Analysis) -> Vec<TokenStream2> { } } + // Forget the monotonics so they won't be dropped. + stmts.push(quote!(core::mem::forget(monotonics);)); + // Enable the interrupts -- this completes the `init`-ialization phase stmts.push(quote!(rtic::export::interrupt::enable();)); |