mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-21 04:49:04 +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
|
continue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
for spi.isBusy() {
|
||||||
|
gosched()
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -397,6 +400,8 @@ func (spi SPI) txrx(tx, rx []byte) error {
|
|||||||
// Transaction ended early due to timeout
|
// Transaction ended early due to timeout
|
||||||
return ErrSPITimeout
|
return ErrSPITimeout
|
||||||
}
|
}
|
||||||
|
for spi.isBusy() {
|
||||||
|
gosched()
|
||||||
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user