aboutsummaryrefslogtreecommitdiff
path: root/macros/src
diff options
context:
space:
mode:
authorGravatar bors[bot] <26634292+bors[bot]@users.noreply.github.com> 2020-08-27 12:40:45 +0000
committerGravatar GitHub <noreply@github.com> 2020-08-27 12:40:45 +0000
commite9022e186c6c3a79c618cdaef5e2e2c11191355a (patch)
tree3e7400fd95bf021c01bc86701974b213e516d4d0 /macros/src
parent312331de58c1edbd9236364eb6209802f7bae35c (diff)
parenta4eb8c576c7a035df41a5f44502d7e150cf3efb6 (diff)
downloadrtic-e9022e186c6c3a79c618cdaef5e2e2c11191355a.tar.gz
rtic-e9022e186c6c3a79c618cdaef5e2e2c11191355a.tar.zst
rtic-e9022e186c6c3a79c618cdaef5e2e2c11191355a.zip
Merge #352
352: Reuse cortex-m r=TeXitoi a=AfoHT Potential fix for #351 Introduced by #338 Co-authored-by: Henrik Tjäder <henrik@tjaders.com>
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!(