Lines Matching refs:read

578     unsigned read = 0;  in MXC_I2C_RevA_Read()  local
588 for (; read < *len - 1; read++) { in MXC_I2C_RevA_Read()
589 int retVal = MXC_I2C_ReadByte((mxc_i2c_regs_t *)i2c, &(bytes[read]), 1); in MXC_I2C_RevA_Read()
592 *len = read; in MXC_I2C_RevA_Read()
597 read++; in MXC_I2C_RevA_Read()
598 *len = read; in MXC_I2C_RevA_Read()
599 return MXC_I2C_ReadByte((mxc_i2c_regs_t *)i2c, &(bytes[read]), ack); in MXC_I2C_RevA_Read()
605 unsigned read = 0; in MXC_I2C_RevA_ReadRXFIFO() local
611 while ((len > read) && (!(i2c->status & MXC_F_I2C_REVA_STATUS_RX_EM))) { in MXC_I2C_RevA_ReadRXFIFO()
612 bytes[read++] = i2c->fifo; in MXC_I2C_RevA_ReadRXFIFO()
615 return read; in MXC_I2C_RevA_ReadRXFIFO()
872 unsigned int read = 0; in MXC_I2C_RevA_MasterTransaction() local
946 while (req->rx_len > read) { in MXC_I2C_RevA_MasterTransaction()
948 read += in MXC_I2C_RevA_MasterTransaction()
949 MXC_I2C_ReadRXFIFO((mxc_i2c_regs_t *)i2c, &req->rx_buf[read], req->rx_len - read); in MXC_I2C_RevA_MasterTransaction()
954 req->rx_len = read; in MXC_I2C_RevA_MasterTransaction()
959 if ((i2c->intfl0 & MXC_F_I2C_REVA_INTFL0_DONE) && (req->rx_len > read) && in MXC_I2C_RevA_MasterTransaction()
961 if ((req->rx_len - read) > MXC_I2C_REVA_MAX_FIFO_TRANSACTION) { in MXC_I2C_RevA_MasterTransaction()
964 i2c->rxctrl1 = (req->rx_len - read); // 0 for 256, otherwise number of bytes to read in MXC_I2C_RevA_MasterTransaction()
1339 unsigned int read = AsyncRead[i2cNum]; in MXC_I2C_RevA_MasterAsyncHandler() local
1382 if (req->rx_len > read) { in MXC_I2C_RevA_MasterAsyncHandler()
1384 read += in MXC_I2C_RevA_MasterAsyncHandler()
1385 MXC_I2C_ReadRXFIFO((mxc_i2c_regs_t *)i2c, &req->rx_buf[read], req->rx_len - read); in MXC_I2C_RevA_MasterAsyncHandler()
1391 if ((req->tx_len == written) && (req->rx_len - read) && in MXC_I2C_RevA_MasterAsyncHandler()
1396 if (read == 0) { in MXC_I2C_RevA_MasterAsyncHandler()
1401 if ((req->rx_len - read) > MXC_I2C_REVA_MAX_FIFO_TRANSACTION) { in MXC_I2C_RevA_MasterAsyncHandler()
1404 i2c->rxctrl1 = (req->rx_len - read); // 0 for 256, otherwise number of bytes to read in MXC_I2C_RevA_MasterAsyncHandler()
1408 if (read < req->rx_len) { in MXC_I2C_RevA_MasterAsyncHandler()
1416 if ((req->tx_len == written) && (req->rx_len == read)) { in MXC_I2C_RevA_MasterAsyncHandler()
1438 AsyncRead[i2cNum] = read; in MXC_I2C_RevA_MasterAsyncHandler()