From a4eb8c576c7a035df41a5f44502d7e150cf3efb6 Mon Sep 17 00:00:00 2001 From: Henrik Tjäder Date: Thu, 27 Aug 2020 12:31:00 +0000 Subject: Reuse cortex-m --- macros/src/codegen/pre_init.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'macros/src/codegen/pre_init.rs') diff --git a/macros/src/codegen/pre_init.rs b/macros/src/codegen/pre_init.rs index 8aae5998..f89dec96 100644 --- a/macros/src/codegen/pre_init.rs +++ b/macros/src/codegen/pre_init.rs @@ -41,8 +41,7 @@ pub fn codegen( if app.args.cores == 1 { stmts.push(quote!( // 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 = peripherals.into(); + let mut core: rtic::export::Peripherals = rtic::export::Peripherals::steal().into(); )); } else { stmts.push(quote!( -- cgit v1.2.3