Skip to content

Commit 7ef80f7

Browse files
author
Henrik Alsér
committed
Add method to disable interrupt for channel event input pins
1 parent f918dd2 commit 7ef80f7

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

nrf-hal-common/src/gpiote.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,16 @@ impl<'a, P: GpioteInputPin> GpioteChannelEvent<'_, P> {
210210
}
211211
self
212212
}
213+
214+
pub fn disable_interrupt(&self) -> &Self {
215+
// Disable interrupt for pin
216+
unsafe {
217+
self.gpiote
218+
.intenclr
219+
.write(|w| w.bits(self.pin.pin() as u32))
220+
}
221+
self
222+
}
213223
}
214224

215225
fn config_channel_event_pin<P: GpioteInputPin>(

0 commit comments

Comments
 (0)