Added bare_metal::CriticalSection to init::Context

This commit is contained in:
Emil Fresk 2020-10-01 20:01:25 +02:00
parent 4d61437bb4
commit fb61a78cdd
3 changed files with 10 additions and 0 deletions

View file

@ -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));
}