aboutsummaryrefslogtreecommitdiff
path: root/macros/src/codegen/software_tasks.rs
diff options
context:
space:
mode:
Diffstat (limited to 'macros/src/codegen/software_tasks.rs')
-rw-r--r--macros/src/codegen/software_tasks.rs21
1 files changed, 12 insertions, 9 deletions
diff --git a/macros/src/codegen/software_tasks.rs b/macros/src/codegen/software_tasks.rs
index a760b067..a39fe4cc 100644
--- a/macros/src/codegen/software_tasks.rs
+++ b/macros/src/codegen/software_tasks.rs
@@ -37,6 +37,7 @@ pub fn codegen(
// Create free queues and inputs / instants buffers
let fq = util::fq_ident(name);
+ let fq = util::mark_internal_ident(&fq);
let (fq_ty, fq_expr, mk_uninit): (_, _, Box<dyn Fn() -> Option<_>>) = {
(
@@ -48,8 +49,9 @@ pub fn codegen(
)
};
mod_app.push(quote!(
- /// Queue version of a free-list that keeps track of empty slots in
- /// the following buffers
+ // /// Queue version of a free-list that keeps track of empty slots in
+ // /// the following buffers
+ #[doc(hidden)]
static mut #fq: #fq_ty = #fq_expr;
));
@@ -57,28 +59,29 @@ pub fn codegen(
.map(|_| quote!(core::mem::MaybeUninit::uninit()))
.collect::<Vec<_>>();
- let app_name = &app.name;
- let app_path = quote! {crate::#app_name};
-
for (_, monotonic) in &app.monotonics {
let instants = util::monotonic_instants_ident(name, &monotonic.ident);
- let m = util::mangle_monotonic_type(&monotonic.ident.to_string());
+ let instants = util::mark_internal_ident(&instants);
+ let mono_type = &monotonic.ty;
let uninit = mk_uninit();
mod_app.push(quote!(
#uninit
- /// Buffer that holds the instants associated to the inputs of a task
+ // /// Buffer that holds the instants associated to the inputs of a task
+ #[doc(hidden)]
static mut #instants:
- [core::mem::MaybeUninit<rtic::time::Instant<#app_path::#m>>; #cap_lit] =
+ [core::mem::MaybeUninit<rtic::time::Instant<#mono_type>>; #cap_lit] =
[#(#elems,)*];
));
}
let uninit = mk_uninit();
let inputs_ident = util::inputs_ident(name);
+ let inputs_ident = util::mark_internal_ident(&inputs_ident);
mod_app.push(quote!(
#uninit
- /// Buffer that holds the inputs of a task
+ // /// Buffer that holds the inputs of a task
+ #[doc(hidden)]
static mut #inputs_ident: [core::mem::MaybeUninit<#input_ty>; #cap_lit] =
[#(#elems,)*];
));