diff options
| author | Henrik Tjäder <henrik@tjaders.com> | 2020-10-02 11:36:28 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-02 11:36:28 +0200 |
| commit | 1e46ffdfbc4e2b088334e1730ba8bdfdaad33a2f (patch) | |
| tree | 004536122e43c657c97453524b2d76093b5637c3 /macros/src/codegen/module.rs | |
| parent | 9ca10b0d8c735a06a3a0a3623a7fc5d09b5e948c (diff) | |
| parent | 4981af8a4bfe5ee5442521794d851b0dc0313488 (diff) | |
Merge branch 'master' into mod_const
Diffstat (limited to 'macros/src/codegen/module.rs')
| -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 863f6c5..359c1cc 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)); } |
