diff options
author | 2020-10-07 15:17:00 +0200 | |
---|---|---|
committer | 2020-10-07 15:17:00 +0200 | |
commit | 6d003e20a83edc064b532d67853f27ec13f4fa4f (patch) | |
tree | 077b18048986d8d225ea4f80bfe7a9cd2996ae89 /macros/src | |
parent | 36781cdd890752d6876623d8802b860e950b24eb (diff) | |
download | rtic-6d003e20a83edc064b532d67853f27ec13f4fa4f.tar.gz rtic-6d003e20a83edc064b532d67853f27ec13f4fa4f.tar.zst rtic-6d003e20a83edc064b532d67853f27ec13f4fa4f.zip |
Now core contains the same `Peripherals` type based on monotonic
Diffstat (limited to 'macros/src')
-rw-r--r-- | macros/src/codegen/module.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/macros/src/codegen/module.rs b/macros/src/codegen/module.rs index 2e51e7db..3d90cbd3 100644 --- a/macros/src/codegen/module.rs +++ b/macros/src/codegen/module.rs @@ -15,7 +15,7 @@ pub fn codegen(ctxt: Context, resources_tick: bool, app: &App, extra: &Extra) -> let mut lt = None; match ctxt { Context::Init => { - if app.uses_schedule() { + if extra.monotonic.is_some() { let m = extra.monotonic(); fields.push(quote!( @@ -277,7 +277,7 @@ pub fn codegen(ctxt: Context, resources_tick: bool, app: &App, extra: &Extra) -> }; let core = if ctxt.is_init() { - if app.uses_schedule() { + if extra.monotonic.is_some() { Some(quote!(core: rtic::Peripherals,)) } else { Some(quote!(core: rtic::export::Peripherals,)) |