Skip to content

Commit 45a7fc6

Browse files
NandoBongersNando Bongers
andauthored
Added the alternate push pull function (#35)
* Added the alternate push pull function * Renamed functions Renamed (into_alternate -> into_alternate_open_drain) and (into_alternate_push_pull -> into_alternate) * Explicitly set push-pull in into_alternate Co-authored-by: Nando Bongers <[email protected]>
1 parent d30e860 commit 45a7fc6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/gpio.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,9 @@ macro_rules! gpio {
520520
gpio.moder.modify(|r, w| {
521521
w.bits((r.bits() & !(0b11 << offset)) | (0b10 << offset))
522522
});
523+
gpio.otyper.modify(|r, w| {
524+
w.bits(r.bits() & !(0b1 << $i))
525+
});
523526
}
524527
$PXi { _mode: PhantomData }
525528
}

0 commit comments

Comments
 (0)