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.
1 parent 0e34084 commit 1c8b813Copy full SHA for 1c8b813
src/gpio.rs
@@ -149,7 +149,7 @@ macro_rules! impl_into_af {
149
// push pull output
150
otyper
151
.otyper()
152
- .modify(|r, w| unsafe { w.bits(r.bits() & !(0b1 << $NUM)) });
+ .modify(|r, w| unsafe { w.bits(r.bits() & !(0b1 << $i)) });
153
afr.afr().modify(|r, w| unsafe {
154
w.bits((r.bits() & !(0b1111 << OFF_AFR)) | ($NUM << OFF_AFR))
155
});
@@ -170,7 +170,7 @@ macro_rules! impl_into_af {
170
// open drain output
171
172
173
- .modify(|r, w| unsafe { w.bits(r.bits() | (0b1 << $NUM)) });
+ .modify(|r, w| unsafe { w.bits(r.bits() | (0b1 << $i)) });
174
175
176
0 commit comments