diff options
author | 2020-12-12 23:24:54 +0100 | |
---|---|---|
committer | 2020-12-12 23:24:54 +0100 | |
commit | 8e8ec9b7b879adae8d4de6cb2320b9b19290a7e0 (patch) | |
tree | 73f8c0664b9af8a9d98f54aabcd6ea6cd59a6765 /macros/src/codegen/util.rs | |
parent | 97a48983d2859740983cbf342e1287182426ed44 (diff) | |
download | rtic-8e8ec9b7b879adae8d4de6cb2320b9b19290a7e0.tar.gz rtic-8e8ec9b7b879adae8d4de6cb2320b9b19290a7e0.tar.zst rtic-8e8ec9b7b879adae8d4de6cb2320b9b19290a7e0.zip |
Monotonic codegen now passing compile stage
Diffstat (limited to 'macros/src/codegen/util.rs')
-rw-r--r-- | macros/src/codegen/util.rs | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/macros/src/codegen/util.rs b/macros/src/codegen/util.rs index d9310dde..329a7ddf 100644 --- a/macros/src/codegen/util.rs +++ b/macros/src/codegen/util.rs @@ -77,8 +77,8 @@ pub fn inputs_ident(task: &Ident) -> Ident { } /// Generates an identifier for the `INSTANTS` buffer (`schedule` API) -pub fn instants_ident(task: &Ident) -> Ident { - Ident::new(&format!("{}_INSTANTS", task), Span::call_site()) +pub fn monotonic_instants_ident(task: &Ident, monotonic: &Ident) -> Ident { + Ident::new(&format!("{}_{}_INSTANTS", task, monotonic), Span::call_site()) } pub fn interrupt_ident() -> Ident { @@ -103,22 +103,6 @@ pub fn is_exception(name: &Ident) -> bool { ) } -/// Generates a pre-reexport identifier for the "late resources" struct -pub fn late_resources_ident(init: &Ident) -> Ident { - Ident::new( - &format!("{}LateResources", init.to_string()), - Span::call_site(), - ) -} - -/// Generates a pre-reexport identifier for the "monotonics" struct -pub fn monotonics_ident(init: &Ident) -> Ident { - Ident::new( - &format!("{}Monotonics", init.to_string()), - Span::call_site(), - ) -} - /// Mangle an ident pub fn mangle_ident(ident: &Ident) -> Ident { Ident::new( |