board: fix gpio input dir flag

softspi works and ad7172 now returns data.
pull/1/head
Astro 2019-08-30 00:28:47 +02:00
parent 1df35ef15f
commit d5b7855c3b
1 changed files with 1 additions and 1 deletions

View File

@ -21,7 +21,7 @@ macro_rules! def_gpio {
}
fn into_input(self) -> GpioInput<Self> {
let gpio = unsafe { &*tm4c129x::$PORT::ptr() };
gpio.dir.modify(|_, w| w.dir().bits(1 << $idx));
gpio.dir.modify(|r, w| w.dir().bits(r.dir().bits() & !(1 << $idx)));
gpio.den.modify(|_, w| w.den().bits(1 << $idx));
GpioInput(self)
}