Skip to content

Commit 59afec6

Browse files
committed
Fix gpio listen return value
This function sets PUPDR as 0b00 which is floating input.
1 parent 4241a75 commit 59afec6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/gpio.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ macro_rules! gpio {
305305
}
306306

307307
/// Configures the pin as external trigger
308-
pub fn listen(self, edge: SignalEdge, exti: &mut EXTI) -> $PXi<Input<PushPull>> {
308+
pub fn listen(self, edge: SignalEdge, exti: &mut EXTI) -> $PXi<Input<Floating>> {
309309
let offset = 2 * $i;
310310
unsafe {
311311
&(*$GPIOX::ptr()).pupdr.modify(|r, w| {

0 commit comments

Comments
 (0)