Skip to content

Commit 6768f33

Browse files
committed
added into_af0 method to gpio
Set alternate function 0 for gpios. Needed if you want to use the MCO of the stm32l433
1 parent a698e80 commit 6768f33

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/gpio.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ macro_rules! gpio {
186186
use super::{
187187

188188
Alternate, AlternateOD,
189-
AF1, AF2, AF3, AF4, AF5, AF6, AF7, AF8, AF9, AF10, AF11, AF12, AF13, AF14, AF15,
189+
AF0, AF1, AF2, AF3, AF4, AF5, AF6, AF7, AF8, AF9, AF10, AF11, AF12, AF13, AF14, AF15,
190190
Floating, GpioExt, Input, OpenDrain, Output, Analog, Edge, ExtiPin,
191191
PullDown, PullUp, PushPull, State, Speed,
192192
};
@@ -738,6 +738,7 @@ macro_rules! gpio {
738738
impl<MODE> $PXi<MODE> {
739739
impl_into_af! {
740740
$PXi $AFR $i,
741+
(AF0, 0, into_af0);
741742
(AF1, 1, into_af1);
742743
(AF2, 2, into_af2);
743744
(AF3, 3, into_af3);

0 commit comments

Comments
 (0)