diff options
| author | Henrik Tjäder <henrik@tjaders.com> | 2020-08-27 12:31:00 +0000 |
|---|---|---|
| committer | Henrik Tjäder <henrik@tjaders.com> | 2020-08-27 12:33:51 +0000 |
| commit | a4eb8c576c7a035df41a5f44502d7e150cf3efb6 (patch) | |
| tree | 3e7400fd95bf021c01bc86701974b213e516d4d0 /macros | |
| parent | 312331de58c1edbd9236364eb6209802f7bae35c (diff) | |
Reuse cortex-m
Diffstat (limited to 'macros')
| -rw-r--r-- | macros/src/codegen/pre_init.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/macros/src/codegen/pre_init.rs b/macros/src/codegen/pre_init.rs index 8aae599..f89dec9 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!( |
