aboutsummaryrefslogtreecommitdiff
path: root/macros/src
diff options
context:
space:
mode:
authorGravatar Henrik Tjäder <henrik@tjaders.com> 2020-08-27 12:31:00 +0000
committerGravatar Henrik Tjäder <henrik@tjaders.com> 2020-08-27 12:33:51 +0000
commita4eb8c576c7a035df41a5f44502d7e150cf3efb6 (patch)
tree3e7400fd95bf021c01bc86701974b213e516d4d0 /macros/src
parent312331de58c1edbd9236364eb6209802f7bae35c (diff)
downloadrtic-a4eb8c576c7a035df41a5f44502d7e150cf3efb6.tar.gz
rtic-a4eb8c576c7a035df41a5f44502d7e150cf3efb6.tar.zst
rtic-a4eb8c576c7a035df41a5f44502d7e150cf3efb6.zip
Reuse cortex-m
Diffstat (limited to 'macros/src')
-rw-r--r--macros/src/codegen/pre_init.rs3
1 files changed, 1 insertions, 2 deletions
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!(