aboutsummaryrefslogtreecommitdiff
path: root/examples/rp/src/bin
diff options
context:
space:
mode:
authorRalph Ursprung <[email protected]>2025-05-15 17:53:31 +0200
committerRalph Ursprung <[email protected]>2025-05-15 18:27:40 +0200
commit117eb45fa0829239da9152b9cf54c3cf706dc76d (patch)
tree86eb9a1c2fdcba1efae1705299adbaeaa87884af /examples/rp/src/bin
parentd1c2ce927ac41a3f81de0f47e0468523d562d1d1 (diff)
add the possibility to document `bind_interrupts` `struct`s
the `bind_interrupts` macro creates a `struct` for the interrupts. it was so far not possible to document those (except for STM32) and there was no generic documentation being generated/added either, thus the `missing_docs` lint was triggered for consumers which enabled it. with this change it is now possible to manually add a comment on the `struct` being defined in the macro invocation. to show that this works one RP example has been modified accordingly.
Diffstat (limited to 'examples/rp/src/bin')
-rw-r--r--examples/rp/src/bin/adc.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/examples/rp/src/bin/adc.rs b/examples/rp/src/bin/adc.rs
index 1bb7c2249..015915586 100644
--- a/examples/rp/src/bin/adc.rs
+++ b/examples/rp/src/bin/adc.rs
@@ -12,9 +12,12 @@ use embassy_rp::gpio::Pull;
12use embassy_time::Timer; 12use embassy_time::Timer;
13use {defmt_rtt as _, panic_probe as _}; 13use {defmt_rtt as _, panic_probe as _};
14 14
15bind_interrupts!(struct Irqs { 15bind_interrupts!(
16 ADC_IRQ_FIFO => InterruptHandler; 16 /// Binds the ADC interrupts.
17}); 17 struct Irqs {
18 ADC_IRQ_FIFO => InterruptHandler;
19 }
20);
18 21
19#[embassy_executor::main] 22#[embassy_executor::main]
20async fn main(_spawner: Spawner) { 23async fn main(_spawner: Spawner) {