Reuse cortex-m

This commit is contained in:
Henrik Tjäder 2020-08-27 12:31:00 +00:00
parent 312331de58
commit a4eb8c576c

View file

@ -41,8 +41,7 @@ pub fn codegen(
if app.args.cores == 1 { if app.args.cores == 1 {
stmts.push(quote!( stmts.push(quote!(
// To set the variable in cortex_m so the peripherals cannot be taken multiple times // To set the variable in cortex_m so the peripherals cannot be taken multiple times
let peripherals = cortex_m::Peripherals::steal(); let mut core: rtic::export::Peripherals = rtic::export::Peripherals::steal().into();
let mut core: rtic::export::Peripherals = peripherals.into();
)); ));
} else { } else {
stmts.push(quote!( stmts.push(quote!(