mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-05 19:43:44 +00:00
rp2040: add spi busy waits on read and read/write transactions
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user