rp2040: add spi busy waits on read and read/write transactions

Этот коммит содержится в:
soypat 2023-06-11 15:03:45 -03:00 коммит произвёл Ayke
родитель ac821d8295
коммит d01d85930d

Просмотреть файл

@ -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
} }