mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-06 12:03:41 +00:00
maixbit (i2c): fix rx fifo buffer length
This commit is contained in:
@@ -611,7 +611,7 @@ func (i2c I2C) Tx(addr uint16, w, r []byte) error {
|
||||
di := 0
|
||||
|
||||
for dataLen != 0 || cmdLen != 0 {
|
||||
fifoLen := 8 - i2c.Bus.RXFLR.Get()
|
||||
fifoLen := i2c.Bus.RXFLR.Get()
|
||||
if dataLen < fifoLen {
|
||||
fifoLen = dataLen
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user