Home | History | Annotate | Download | only in rohm_rpr0521

Lines Matching refs:xfer

301     struct I2cTransfer *xfer = cookie;
303 xfer->tx = tx;
304 xfer->rx = rx;
305 xfer->err = err;
339 struct I2cTransfer *xfer = allocXfer(state);
342 if (xfer != NULL) {
343 xfer->txrxBuf[0] = reg;
344 xfer->txrxBuf[1] = value;
345 ret = i2cMasterTx(I2C_BUS_ID, I2C_ADDR, xfer->txrxBuf, 2, i2cCallback, xfer);
484 struct I2cTransfer *xfer;
490 xfer = allocXfer(SENSOR_STATE_IDLE);
491 if (xfer != NULL) {
492 xfer->txrxBuf[0] = ROHM_RPR0521_REG_PS_OFFSET_LSB;
493 xfer->txrxBuf[1] = offset & 0xFF;
494 xfer->txrxBuf[2] = (offset >> 8) & 0x3;
495 i2cMasterTx(I2C_BUS_ID, I2C_ADDR, xfer->txrxBuf, 3, i2cCallback, xfer);
570 xfer)
578 switch (xfer->state) {
589 if (xfer->err != 0 || xfer->txrxBuf[0] != ROHM_RPR0521_ID) {
668 als0 = *(uint16_t*)(xfer->txrxBuf);
669 als1 = *(uint16_t*)(xfer->txrxBuf+2);
684 ps = *(uint16_t*)(xfer->txrxBuf);
713 xfer->inUse = false;
758 struct I2cTransfer *xfer;
773 xfer = allocXfer(SENSOR_STATE_ALS_SAMPLING);
774 if (xfer != NULL) {
775 xfer->txrxBuf[0] = ROHM_RPR0521_REG_ALS_DATA0_LSB;
776 i2cMasterTxRx(I2C_BUS_ID, I2C_ADDR, xfer->txrxBuf, 1, xfer->txrxBuf, 4, i2cCallback, xfer);
782 xfer = allocXfer(SENSOR_STATE_PROX_SAMPLING);
783 if (xfer != NULL) {
784 xfer->txrxBuf[0] = ROHM_RPR0521_REG_PS_DATA_LSB;
785 i2cMasterTxRx(I2C_BUS_ID, I2C_ADDR, xfer->txrxBuf, 1, xfer->txrxBuf, 7, i2cCallback, xfer);