diff options
author | 2020-10-02 11:36:28 +0200 | |
---|---|---|
committer | 2020-10-02 11:36:28 +0200 | |
commit | 1e46ffdfbc4e2b088334e1730ba8bdfdaad33a2f (patch) | |
tree | 004536122e43c657c97453524b2d76093b5637c3 /macros/src | |
parent | 9ca10b0d8c735a06a3a0a3623a7fc5d09b5e948c (diff) | |
parent | 4981af8a4bfe5ee5442521794d851b0dc0313488 (diff) | |
download | rtic-1e46ffdfbc4e2b088334e1730ba8bdfdaad33a2f.tar.gz rtic-1e46ffdfbc4e2b088334e1730ba8bdfdaad33a2f.tar.zst rtic-1e46ffdfbc4e2b088334e1730ba8bdfdaad33a2f.zip |
Merge branch 'master' into mod_const
Diffstat (limited to 'macros/src')
-rw-r--r-- | macros/src/codegen/module.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/macros/src/codegen/module.rs b/macros/src/codegen/module.rs index 863f6c5b..359c1cce 100644 --- a/macros/src/codegen/module.rs +++ b/macros/src/codegen/module.rs @@ -47,6 +47,14 @@ pub fn codegen(ctxt: Context, resources_tick: bool, app: &App, extra: &Extra) -> values.push(quote!(device: #device::Peripherals::steal())); } + lt = Some(quote!('a)); + fields.push(quote!( + /// Critical section token for init + pub cs: rtic::export::CriticalSection<#lt> + )); + + values.push(quote!(cs: rtic::export::CriticalSection::new())); + values.push(quote!(core)); } |