diff options
Diffstat (limited to 'src/machine/machine_rp2040_spi.go')
-rw-r--r-- | src/machine/machine_rp2040_spi.go | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/machine/machine_rp2040_spi.go b/src/machine/machine_rp2040_spi.go index 07a3745ea..cb60fdbcb 100644 --- a/src/machine/machine_rp2040_spi.go +++ b/src/machine/machine_rp2040_spi.go @@ -368,6 +368,9 @@ func (spi SPI) rx(rx []byte, txrepeat byte) error { continue } } + for spi.isBusy() { + gosched() + } return nil } @@ -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 } |