mirror of
https://github.com/rtic-rs/rtic.git
synced 2025-12-19 14:25:18 +01:00
Now core contains the same Peripherals type based on monotonic
This commit is contained in:
parent
36781cdd89
commit
6d003e20a8
2 changed files with 30 additions and 2 deletions
|
|
@ -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,))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue