Skip to content

Commit 47bb5fd

Browse files
committed
Improve documentation for gpio nvic()
1 parent b9509f3 commit 47bb5fd

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/gpio.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,11 @@ where
570570
Mode: marker::Active,
571571
{
572572
/// NVIC interrupt number of interrupt from this pin
573+
///
574+
/// Used to unmask / enable the interrupt with [`cortex_m::peripheral::NVIC::unmask()`].
575+
/// This is also useful for all other [`cortex_m::peripheral::NVIC`] functions.
576+
// TODO(Sh3rm4n): It would be cool to have this either const or have a const function.
577+
// But this is currenlty not possible, because index() is runtime defined.
573578
pub fn nvic(&self) -> Interrupt {
574579
match self.index.index() {
575580
0 => Interrupt::EXTI0,

0 commit comments

Comments
 (0)