We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
listen
1 parent 39eb64a commit 67b13beCopy full SHA for 67b13be
src/gpio.rs
@@ -475,17 +475,7 @@ macro_rules! gpio {
475
}
476
477
/// Configures the pin as external trigger
478
- pub fn listen(self, edge: SignalEdge, exti: &mut EXTI) -> $PXi<Input<PushPull>> {
479
- let offset = 2 * $i;
480
- unsafe {
481
- let gpio = &(*$GPIOX::ptr());
482
- gpio.pupdr.modify(|r, w| {
483
- w.bits(r.bits() & !(0b11 << offset))
484
- });
485
- gpio.moder.modify(|r, w| {
486
487
- })
488
- };
+ pub fn listen(self, edge: SignalEdge, exti: &mut EXTI) -> $PXi<MODE> {
489
exti.listen(Event::from_code($i), edge);
490
$PXi { _mode: PhantomData }
491
0 commit comments