add the possibility to document bind_interrupts structs

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.
This commit is contained in:
Ralph Ursprung
2025-05-15 17:53:31 +02:00
parent d1c2ce927a
commit 117eb45fa0
5 changed files with 38 additions and 20 deletions

View File

@@ -12,9 +12,12 @@ use embassy_rp::gpio::Pull;
use embassy_time::Timer;
use {defmt_rtt as _, panic_probe as _};
bind_interrupts!(struct Irqs {
ADC_IRQ_FIFO => InterruptHandler;
});
bind_interrupts!(
/// Binds the ADC interrupts.
struct Irqs {
ADC_IRQ_FIFO => InterruptHandler;
}
);
#[embassy_executor::main]
async fn main(_spawner: Spawner) {