Home | History | Annotate | Download | only in intersil_isl29034

Lines Matching refs:xfer

171     struct I2cTransfer *xfer = cookie;
173 xfer->tx = tx;
174 xfer->rx = rx;
175 xfer->err = err;
204 struct I2cTransfer *xfer = allocXfer(state);
207 if (xfer != NULL) {
208 xfer->txrxBuf[0] = reg;
209 xfer->txrxBuf[1] = value;
210 ret = i2cMasterTx(ISL29034_I2C_BUS_ID, ISL29034_I2C_ADDR, xfer->txrxBuf, 2, i2cCallback, xfer);
313 static void handle_i2c_event(struct I2cTransfer *xfer)
318 switch (xfer->state) {
321 if (xfer->err != 0 ||
322 (xfer->txrxBuf[0] & ISL29034_ID_MASK) != ISL29034_ID) {
329 if (xfer->txrxBuf[0] & ISL29034_ID_BOUT) {
332 xfer->txrxBuf[0] ^ ISL29034_ID_BOUT,
361 DEBUG_PRINT("sample ready: als0=%u als1=%u\n", xfer->txrxBuf[0], xfer->txrxBuf[1]);
365 sample.fdata = getLuxFromAlsData(xfer->txrxBuf[0] | (xfer->txrxBuf[1] << 8));
376 xfer->inUse = false;
414 struct I2cTransfer *xfer;
420 xfer = allocXfer(SENSOR_STATE_VERIFY_ID);
421 if (xfer != NULL) {
422 xfer->txrxBuf[0] = ISL29034_REG_ID;
423 i2cMasterTxRx(ISL29034_I2C_BUS_ID, ISL29034_I2C_ADDR, xfer->txrxBuf, 1, xfer->txrxBuf, 1, i2cCallback, xfer);
434 xfer = allocXfer(SENSOR_STATE_SAMPLING);
435 if (xfer != NULL) {
436 xfer->txrxBuf[0] = ISL29034_REG_DATA_L;
437 i2cMasterTxRx(ISL29034_I2C_BUS_ID, ISL29034_I2C_ADDR, xfer->txrxBuf, 1, xfer->txrxBuf, 2, i2cCallback, xfer);