aboutsummaryrefslogtreecommitdiff
path: root/macros/src/codegen/hardware_tasks.rs
diff options
context:
space:
mode:
authorGravatar bors[bot] <26634292+bors[bot]@users.noreply.github.com> 2023-01-22 06:57:56 +0000
committerGravatar GitHub <noreply@github.com> 2023-01-22 06:57:56 +0000
commitb0bda53e4e650dccb1a30718ce8dbefef6584ad0 (patch)
tree066088a7df2514af02ee0cebe6646e41efddf963 /macros/src/codegen/hardware_tasks.rs
parent86ce8919aec4623a0816b28f1adcd86db33689c8 (diff)
parent3f74f3b8459fdd451707511954a6ea3d128aabe3 (diff)
downloadrtic-b0bda53e4e650dccb1a30718ce8dbefef6584ad0.tar.gz
rtic-b0bda53e4e650dccb1a30718ce8dbefef6584ad0.tar.zst
rtic-b0bda53e4e650dccb1a30718ce8dbefef6584ad0.zip
Merge #689
689: Missing docs: Improve #[doc] generation r=korken89 a=AfoHT Improve RTIC doc handling Enable use of ``` #![deny(missing_docs)] ``` and makes the cargo doc output more useful Co-authored-by: Henrik Tjäder <henrik@tjaders.com>
Diffstat (limited to 'macros/src/codegen/hardware_tasks.rs')
-rw-r--r--macros/src/codegen/hardware_tasks.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/macros/src/codegen/hardware_tasks.rs b/macros/src/codegen/hardware_tasks.rs
index f75c71d4..780cc7e3 100644
--- a/macros/src/codegen/hardware_tasks.rs
+++ b/macros/src/codegen/hardware_tasks.rs
@@ -33,10 +33,12 @@ pub fn codegen(
let priority = task.args.priority;
let cfgs = &task.cfgs;
let attrs = &task.attrs;
+ let user_hardware_task_isr_doc = &format!(" User HW task ISR trampoline for {name}");
mod_app.push(quote!(
#[allow(non_snake_case)]
#[no_mangle]
+ #[doc = #user_hardware_task_isr_doc]
#(#attrs)*
#(#cfgs)*
unsafe fn #symbol() {
@@ -88,11 +90,13 @@ pub fn codegen(
extra,
));
+ let user_hardware_task_doc = &format!(" User HW task: {name}");
if !task.is_extern {
let attrs = &task.attrs;
let context = &task.context;
let stmts = &task.stmts;
user_tasks.push(quote!(
+ #[doc = #user_hardware_task_doc]
#(#attrs)*
#[allow(non_snake_case)]
fn #name(#context: #name::Context) {