aboutsummaryrefslogtreecommitdiff
path: root/macros/src/codegen/timer_queue.rs
diff options
context:
space:
mode:
authorGravatar Emil Fresk <emil.fresk@gmail.com> 2021-02-25 19:05:39 +0100
committerGravatar Emil Fresk <emil.fresk@gmail.com> 2021-02-25 19:16:28 +0100
commitd351f55e1c8e60a9bbd69b40b84a39dab5d20051 (patch)
treefbfdb97dda4dbc60a10f7f15ede481cecd474500 /macros/src/codegen/timer_queue.rs
parent767d46e05bbc88eb3c236cf468f9432c7fe0ce05 (diff)
downloadrtic-d351f55e1c8e60a9bbd69b40b84a39dab5d20051.tar.gz
rtic-d351f55e1c8e60a9bbd69b40b84a39dab5d20051.tar.zst
rtic-d351f55e1c8e60a9bbd69b40b84a39dab5d20051.zip
Documentation generation fixes
Test fixes
Diffstat (limited to 'macros/src/codegen/timer_queue.rs')
-rw-r--r--macros/src/codegen/timer_queue.rs24
1 files changed, 14 insertions, 10 deletions
diff --git a/macros/src/codegen/timer_queue.rs b/macros/src/codegen/timer_queue.rs
index ea2fee66..82d0ac98 100644
--- a/macros/src/codegen/timer_queue.rs
+++ b/macros/src/codegen/timer_queue.rs
@@ -26,9 +26,10 @@ pub fn codegen(app: &App, analysis: &Analysis, _extra: &Extra) -> Vec<TokenStrea
})
.collect::<Vec<_>>();
- let doc = "Tasks that can be scheduled".to_string();
+ // let doc = "Tasks that can be scheduled".to_string();
items.push(quote!(
- #[doc = #doc]
+ // #[doc = #doc]
+ #[doc(hidden)]
#[allow(non_camel_case_types)]
#[derive(Clone, Copy)]
enum #t {
@@ -41,25 +42,27 @@ pub fn codegen(app: &App, analysis: &Analysis, _extra: &Extra) -> Vec<TokenStrea
for (_, monotonic) in &app.monotonics {
let monotonic_name = monotonic.ident.to_string();
let tq = util::tq_ident(&monotonic_name);
+ let tq = util::mark_internal_ident(&tq);
let t = util::schedule_t_ident();
- let m = util::mangle_monotonic_type(&monotonic_name);
+ let mono_type = &monotonic.ty;
let m_ident = util::monotonic_ident(&monotonic_name);
+ let m_ident = util::mark_internal_ident(&m_ident);
let app_name = &app.name;
let app_path = quote! {crate::#app_name};
// Static variables and resource proxy
{
- let doc = &format!("Timer queue for {}", monotonic_name);
+ // let doc = &format!("Timer queue for {}", monotonic_name);
let cap = app
.software_tasks
.iter()
.map(|(_name, task)| task.args.capacity)
.sum();
let n = util::capacity_typenum(cap, false);
- let tq_ty = quote!(rtic::export::TimerQueue<#m, #t, #n>);
+ let tq_ty = quote!(rtic::export::TimerQueue<#mono_type, #t, #n>);
items.push(quote!(
- #[doc = #doc]
+ #[doc(hidden)]
static mut #tq: #tq_ty = rtic::export::TimerQueue(
rtic::export::BinaryHeap(
rtic::export::iBinaryHeap::new()
@@ -68,12 +71,12 @@ pub fn codegen(app: &App, analysis: &Analysis, _extra: &Extra) -> Vec<TokenStrea
));
let mono = util::monotonic_ident(&monotonic_name);
- let doc = &format!("Storage for {}", monotonic_name);
- let mono_ty = quote!(Option<#m>);
+ let mono = util::mark_internal_ident(&mono);
+ // let doc = &format!("Storage for {}", monotonic_name);
items.push(quote!(
- #[doc = #doc]
- static mut #mono: #mono_ty = None;
+ #[doc(hidden)]
+ static mut #mono: Option<#mono_type> = None;
));
}
@@ -89,6 +92,7 @@ pub fn codegen(app: &App, analysis: &Analysis, _extra: &Extra) -> Vec<TokenStrea
let cfgs = &task.cfgs;
let priority = task.args.priority;
let rq = util::rq_ident(priority);
+ let rq = util::mark_internal_ident(&rq);
let rqt = util::spawn_t_ident(priority);
// The interrupt that runs the task dispatcher