forked from M-Labs/ionpak-thermostat
board: fix gpio input dir flag
softspi works and ad7172 now returns data.
This commit is contained in:
parent
1df35ef15f
commit
d5b7855c3b
|
@ -21,7 +21,7 @@ macro_rules! def_gpio {
|
||||||
}
|
}
|
||||||
fn into_input(self) -> GpioInput<Self> {
|
fn into_input(self) -> GpioInput<Self> {
|
||||||
let gpio = unsafe { &*tm4c129x::$PORT::ptr() };
|
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));
|
gpio.den.modify(|_, w| w.den().bits(1 << $idx));
|
||||||
GpioInput(self)
|
GpioInput(self)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue