Skip to content

Commit

Permalink
rp2040: add spi busy waits on read and read/write transactions
Browse files Browse the repository at this point in the history
  • Loading branch information
soypat authored and aykevl committed Jun 11, 2023
1 parent ac821d8 commit d01d859
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/machine/machine_rp2040_spi.go
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,9 @@ func (spi SPI) rx(rx []byte, txrepeat byte) error {
continue
}
}
for spi.isBusy() {
gosched()
}
return nil
}

Expand Down Expand Up @@ -397,6 +400,8 @@ func (spi SPI) txrx(tx, rx []byte) error {
// Transaction ended early due to timeout
return ErrSPITimeout
}

for spi.isBusy() {
gosched()
}
return nil
}

0 comments on commit d01d859

Please sign in to comment.