forked from M-Labs/ionpak-thermostat
board: move softspi input read before high flank
This commit is contained in:
parent
f7af12adf5
commit
baab9b2d3f
|
@ -54,10 +54,10 @@ impl<SCK: OutputPin, MOSI: OutputPin, MISO: InputPin> SoftSpi<SCK, MOSI, MISO> {
|
|||
}
|
||||
State::Transfer { clock_phase: true,
|
||||
mask, output, mut input } => {
|
||||
let _ = self.sck.set_high();
|
||||
if self.miso.is_high().unwrap_or(false) {
|
||||
input |= mask;
|
||||
}
|
||||
let _ = self.sck.set_high();
|
||||
|
||||
if mask != 1 {
|
||||
self.state = State::Transfer {
|
||||
|
|
Loading…
Reference in New Issue