i2c revert to old fifo write

This commit is contained in:
me-no-dev 2016-12-09 18:07:59 +02:00
parent 4e458fd6fb
commit 8e7d00b9a8

View File

@ -172,13 +172,9 @@ i2c_err_t i2cWrite(i2c_t * i2c, uint16_t address, bool addr_10bit, uint8_t * dat
} }
} }
i = 0; i = 0;
uint32_t fifotail = 0;
while(i<dataSend) { while(i<dataSend) {
fifotail = i2c->dev->fifo_st.tx_fifo_end_addr;
i++; i++;
i2c->dev->fifo_data.data = data[index++]; i2c->dev->fifo_data.data = data[index++];
// Wait for FIFO to update
while(i2c->dev->fifo_st.tx_fifo_end_addr == fifotail) {};
} }
i2cSetCmd(i2c, 1, I2C_CMD_WRITE, willSend, false, false, true); i2cSetCmd(i2c, 1, I2C_CMD_WRITE, willSend, false, false, true);
dataLen -= willSend; dataLen -= willSend;