Skip to content

Commit 712bf10

Browse files
Improve EXTI documentation
1 parent 777aa51 commit 712bf10

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/exti.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ impl ExtiExt for EXTI {
118118
}
119119
}
120120

121+
/// Disables the interrupt on `line`.
121122
fn unlisten(&self, line: u8) {
122123
assert_line_valid(line);
123124

@@ -126,16 +127,22 @@ impl ExtiExt for EXTI {
126127
bb::clear(&self.imr, line);
127128
}
128129

130+
/// Marks `line` as "pending".
131+
///
132+
/// This will cause an interrupt if the EXTI was previously configured to
133+
/// listen on `line`.
129134
fn pend_interrupt(&self, line: u8) {
130135
assert_line_valid(line);
131136

132137
bb::set(&self.swier, line);
133138
}
134139

140+
/// Get a bitmask of currently pending IRQs.
135141
fn get_pending_irq(&self) -> u32 {
136142
self.pr.read().bits()
137143
}
138144

145+
/// Marks `line` as "not pending".
139146
fn clear_irq(&self, line: u8) {
140147
assert_line_valid(line);
141148

@@ -149,7 +156,8 @@ impl ExtiExt for EXTI {
149156
///
150157
/// # Panics
151158
///
152-
/// Panics, if `line` is not between 0 and 15 (inclusive).
159+
/// Panics, if `line` is an invalid EXTI line (reserved or not defined).
160+
/// Check the Reference Manual for a list of valid lines.
153161
fn wait_for_irq<M>(&mut self, line: u8, mut power_mode: M)
154162
where M: PowerMode
155163
{

0 commit comments

Comments
 (0)