Home
last modified time | relevance | path

Searched refs:txrxBuf (Results 1 – 12 of 12) sorted by relevance

/device/google/contexthub/firmware/os/drivers/ams_tmd2772/
Dams_tmd2772.c162 } txrxBuf; member
256 xfer->txrxBuf.bytes[0] = reg; in writeRegister()
257 xfer->txrxBuf.bytes[1] = value; in writeRegister()
258 ret = i2cMasterTx(I2C_BUS_ID, I2C_ADDR, xfer->txrxBuf.bytes, 2, i2cCallback, xfer); in writeRegister()
311 xfer->txrxBuf.bytes[0] = AMS_TMD2772_REG_ENABLE; in setMode()
312 xfer->txrxBuf.bytes[1] = POWER_ON_BIT | WAIT_ENABLE_BIT | in setMode()
314 xfer->txrxBuf.bytes[2] = AMS_TMD2772_ATIME_SETTING; in setMode()
315 xfer->txrxBuf.bytes[3] = AMS_TMD2772_PTIME_SETTING; in setMode()
316 …xfer->txrxBuf.bytes[4] = alsOn ? AMS_TMD2772_WTIME_SETTING_ALS_ON : AMS_TMD2772_WTIME_SETTING_ALS_… in setMode()
317 i2cMasterTx(I2C_BUS_ID, I2C_ADDR, xfer->txrxBuf.bytes, 5, i2cCallback, xfer); in setMode()
[all …]
/device/google/contexthub/firmware/os/drivers/ams_tmd4903/
Dams_tmd4903.c219 uint8_t txrxBuf[AMS_TMD4903_MAX_I2C_TRANSFER_SIZE]; member
309 xfer->txrxBuf[0] = reg; in writeRegister()
310 xfer->txrxBuf[1] = value; in writeRegister()
311 ret = i2cMasterTx(I2C_BUS_ID, I2C_ADDR, xfer->txrxBuf, 2, i2cCallback, xfer); in writeRegister()
640 xfer->txrxBuf[0] = AMS_TMD4903_REG_OFFSETNL; in sensorCfgDataProx()
641 *((int16_t*)&xfer->txrxBuf[1]) = offsets[0]; in sensorCfgDataProx()
642 *((int16_t*)&xfer->txrxBuf[3]) = offsets[1]; in sensorCfgDataProx()
643 *((int16_t*)&xfer->txrxBuf[5]) = offsets[2]; in sensorCfgDataProx()
644 *((int16_t*)&xfer->txrxBuf[7]) = offsets[3]; in sensorCfgDataProx()
645 i2cMasterTx(I2C_BUS_ID, I2C_ADDR, xfer->txrxBuf, 9, i2cCallback, xfer); in sensorCfgDataProx()
[all …]
/device/google/contexthub/firmware/os/drivers/intersil_isl29034/
Disl29034.c129 uint8_t txrxBuf[ISL29034_MAX_I2C_TRANSFER_SIZE]; member
208 xfer->txrxBuf[0] = reg; in writeRegister()
209 xfer->txrxBuf[1] = value; in writeRegister()
210 … ret = i2cMasterTx(ISL29034_I2C_BUS_ID, ISL29034_I2C_ADDR, xfer->txrxBuf, 2, i2cCallback, xfer); in writeRegister()
322 (xfer->txrxBuf[0] & ISL29034_ID_MASK) != ISL29034_ID) { in handle_i2c_event()
329 if (xfer->txrxBuf[0] & ISL29034_ID_BOUT) { in handle_i2c_event()
332 xfer->txrxBuf[0] ^ ISL29034_ID_BOUT, in handle_i2c_event()
341 nextXfer->txrxBuf[0] = ISL29034_REG_CMD_1; in handle_i2c_event()
342 nextXfer->txrxBuf[1] = ISL29034_CMD1_POWERDOWN; in handle_i2c_event()
343 nextXfer->txrxBuf[2] = ISL29034_CMD2_RANGE_64KLUX | ISL29034_CMD2_RES_16BIT; in handle_i2c_event()
[all …]
/device/google/contexthub/firmware/os/drivers/rohm_rpr0521/
Drohm_rpr0521.c218 uint8_t txrxBuf[ROHM_RPR0521_MAX_I2C_TRANSFER_SIZE]; member
342 int ret = i2cMasterTx(I2C_BUS_ID, I2C_ADDR, xfer->txrxBuf, txSize, i2cCallback, xfer); in i2cWrite()
358 xfer->txrxBuf[0] = reg; in writeRegister()
359 xfer->txrxBuf[1] = value; in writeRegister()
372 xfer->txrxBuf[0] = reg; in readRegister()
374 xfer->txrxBuf, 1, xfer->txrxBuf, len, i2cCallback, xfer); in readRegister()
525 xfer->txrxBuf[0] = ROHM_RPR0521_REG_PS_OFFSET_LSB; in sensorCfgDataProx()
526 xfer->txrxBuf[1] = offset & 0xFF; in sensorCfgDataProx()
527 xfer->txrxBuf[2] = (offset >> 8) & 0x3; in sensorCfgDataProx()
616 if (xfer->err != 0 || xfer->txrxBuf[0] != ROHM_RPR0521_ID) { in handle_i2c_event()
[all …]
/device/google/contexthub/firmware/os/drivers/si_si7034/
Dsi7034a10.c114 uint8_t txrxBuf[SI7034_MAX_I2C_TRANSFER_SIZE]; member
183 xfer->txrxBuf[0] = addr0; in si7034_i2c_read()
184 xfer->txrxBuf[1] = addr1; in si7034_i2c_read()
186 xfer->txrxBuf, 2, xfer->txrxBuf, 6, i2cCallback, xfer); in si7034_i2c_read()
202 xfer->txrxBuf[0] = data; in si7034_i2c_write()
204 xfer->txrxBuf, 1, i2cCallback, xfer); in si7034_i2c_write()
377 INFO_PRINT("Device ID = (%02x)\n", xfer->txrxBuf[0]); in handleI2cEvent()
378 if ((xfer->txrxBuf[0] != SI7034_ID_SAMPLE) && in handleI2cEvent()
379 (xfer->txrxBuf[0] != SI7034_ID_PROD)) in handleI2cEvent()
394 value = ((uint32_t)(xfer->txrxBuf[3]) << 8) | xfer->txrxBuf[4]; in handleI2cEvent()
[all …]
/device/google/contexthub/firmware/os/drivers/synaptics_s3708/
Dsynaptics_s3708.c121 uint8_t txrxBuf[MAX_I2C_TRANSFER_SIZE]; member
220 memset(mTask.transfers[i].txrxBuf, 0x00, sizeof(mTask.transfers[i].txrxBuf)); in allocXfer()
241 …ret = i2cMasterTxRx(I2C_BUS_ID, I2C_ADDR, xfer->txrxBuf, txBytes, xfer->txrxBuf, rxBytes, i2cCallb… in performXfer()
243 ret = i2cMasterTx(I2C_BUS_ID, I2C_ADDR, xfer->txrxBuf, txBytes, i2cCallback, xfer); in performXfer()
260 xfer->txrxBuf[0] = reg; in writeRegister()
261 xfer->txrxBuf[1] = value; in writeRegister()
279 xfer->txrxBuf[0] = S3708_REG_CTRL_BASE + S3708_REG_CTRL_20_OFFSET; in setReportingMode()
280 xfer->txrxBuf[1] = 0x00; in setReportingMode()
281 xfer->txrxBuf[2] = 0x00; in setReportingMode()
282 xfer->txrxBuf[3] = mode; in setReportingMode()
[all …]
/device/google/contexthub/firmware/os/drivers/st_hts221/
Dhts221.c141 uint8_t txrxBuf[HTS221_MAX_I2C_TRANSFER_SIZE]; member
236 xfer->txrxBuf[0] = 0x80 | addr; in i2c_read()
238 xfer->txrxBuf, 1, xfer->txrxBuf, len, i2cCallback, xfer)) < 0) { in i2c_read()
254 xfer->txrxBuf[0] = addr; in i2c_write()
255 xfer->txrxBuf[1] = data; in i2c_write()
256 …if ((ret = i2cMasterTx(HTS221_I2C_BUS_ID, HTS221_I2C_ADDR, xfer->txrxBuf, 2, i2cCallback, xfer)) <… in i2c_write()
398 hts221_save_calib_data(xfer->txrxBuf); in handleCommDoneEvt()
407 if (xfer->err != 0 || xfer->txrxBuf[0] != HTS221_WAI_REG_VAL) { in handleCommDoneEvt()
408 DEBUG_PRINT("WAI returned is: %02x\n", xfer->txrxBuf[0]); in handleCommDoneEvt()
412 INFO_PRINT( "Device ID is correct! (%02x)\n", xfer->txrxBuf[0]); in handleCommDoneEvt()
[all …]
/device/google/contexthub/firmware/os/drivers/bosch_bmp280/
Dbosch_bmp280.c109 uint8_t txrxBuf[BOSCH_BMP280_MAX_I2C_TRANSFER_SIZE]; member
216 xfer->txrxBuf[0] = reg; in writeRegister()
217 xfer->txrxBuf[1] = value; in writeRegister()
218 ret = i2cMasterTx(I2C_BUS_ID, I2C_ADDR, xfer->txrxBuf, 2, i2cCallback, xfer); in writeRegister()
562 newXfer->txrxBuf[0] = BOSCH_BMP280_REG_ID; in handleI2cEvent()
563 …ret = i2cMasterTxRx(I2C_BUS_ID, I2C_ADDR, newXfer->txrxBuf, 1, newXfer->txrxBuf, 1, i2cCallback, n… in handleI2cEvent()
597 if (xfer->err != 0 || xfer->txrxBuf[0] != BOSCH_BMP280_ID) { in handleI2cEvent()
605 newXfer->txrxBuf[0] = BOSCH_BMP280_REG_DIG_T1; in handleI2cEvent()
606 …ret = i2cMasterTxRx(I2C_BUS_ID, I2C_ADDR, newXfer->txrxBuf, 1, (uint8_t*)&mTask.comp, 24, i2cCallb… in handleI2cEvent()
660 getTempAndBaro(xfer->txrxBuf, &pressure_Pa, &temp_centigrade); in handleI2cEvent()
[all …]
/device/google/contexthub/firmware/os/drivers/st_lps22hb/
Dlps22hb.c149 uint8_t txrxBuf[LPS22HB_MAX_I2C_TRANSFER_SIZE]; member
254 xfer->txrxBuf[0] = 0x80 | addr; in i2c_read()
255 …ret = i2cMasterTxRx(LPS22HB_I2C_BUS_ID, LPS22HB_I2C_ADDR, xfer->txrxBuf, 1, xfer->txrxBuf, len, i2… in i2c_read()
271 xfer->txrxBuf[0] = addr; in i2c_write()
272 xfer->txrxBuf[1] = data; in i2c_write()
273 …if ((ret = i2cMasterTx(LPS22HB_I2C_BUS_ID, LPS22HB_I2C_ADDR, xfer->txrxBuf, 2, i2cCallback, xfer))… in i2c_write()
539 if (xfer->err != 0 || xfer->txrxBuf[0] != LPS22HB_WAI_REG_VAL) { in handleCommDoneEvt()
540 DEBUG_PRINT("WAI returned is: %02x\n", xfer->txrxBuf[0]); in handleCommDoneEvt()
545 INFO_PRINT("Device ID is correct! (%02x)\n", xfer->txrxBuf[0]); in handleCommDoneEvt()
582 ptr_samples = xfer->txrxBuf; in handleCommDoneEvt()
[all …]
/device/google/contexthub/firmware/os/drivers/st_acc44/
Dst_acc44.c223 uint8_t txrxBuf[ST_ACC44_MAX_I2C_TRANSFER_SIZE]; member
602 xfer->txrxBuf[0] = ST_ACC44_I2C_AUTO_INCR | addr; in st_acc44_i2c_read()
603 …t = i2cMasterTxRx(ST_ACC44_I2C_BUS_ID, ST_ACC44_I2C_ADDR, xfer->txrxBuf, 1, xfer->txrxBuf, len, st… in st_acc44_i2c_read()
621 xfer->txrxBuf[0] = addr; in st_acc44_i2c_write()
622 xfer->txrxBuf[1] = data; in st_acc44_i2c_write()
623 …if ((ret = i2cMasterTx(ST_ACC44_I2C_BUS_ID, ST_ACC44_I2C_ADDR, xfer->txrxBuf, 2, st_acc44_i2cCallb… in st_acc44_i2c_write()
701 if (xfer->err != 0 || xfer->txrxBuf[0] != ST_ACC44_WAI_REG_VAL) { in st_acc44_handleCommDoneEvt()
702 DEBUG_PRINT("WAI returned is: %02x\n", xfer->txrxBuf[0]); in st_acc44_handleCommDoneEvt()
706 INFO_PRINT("Device ID is correct! (%02x)\n", xfer->txrxBuf[0]); in st_acc44_handleCommDoneEvt()
750 parseRawData(&xfer->txrxBuf[0], 1, mTask.Timestamp); in st_acc44_handleCommDoneEvt()
/device/google/contexthub/firmware/os/drivers/st_mag40/
Dst_mag40.c201 uint8_t txrxBuf[ST_MAG40_MAX_I2C_TRANSFER_SIZE]; member
378 xfer->txrxBuf[0] = ST_MAG40_I2C_AUTO_INCR | addr; in i2c_read()
379 …i2cMasterTxRx(ST_MAG40_I2C_BUS_ID, ST_MAG40_I2C_ADDR, xfer->txrxBuf, 1, xfer->txrxBuf, len, i2cCal… in i2c_read()
390 xfer->txrxBuf[0] = addr; in i2c_write()
391 xfer->txrxBuf[1] = data; in i2c_write()
392 i2cMasterTx(ST_MAG40_I2C_BUS_ID, ST_MAG40_I2C_ADDR, xfer->txrxBuf, 2, i2cCallback, xfer); in i2c_write()
577 uint8_t *raw = &xfer->txrxBuf[0]; in magTestHandling()
606 uint8_t *raw = &xfer->txrxBuf[0]; in magTestHandling()
899 wai = &xfer->txrxBuf[0]; in handleCommDoneEvt()
941 parseRawData(&xfer->txrxBuf[0]); in handleCommDoneEvt()
/device/google/contexthub/firmware/os/drivers/leds/
Dleds_lp3943.c93 uint8_t txrxBuf[LP3943_MAX_I2C_TRANSFER_SIZE]; member
179 xfer->txrxBuf[0] = reg; in writeRegister()
180 xfer->txrxBuf[1] = value; in writeRegister()
181 ret = i2cMasterTx(I2C_BUS_ID, I2C_ADDR, xfer->txrxBuf, 2, i2cCallback, xfer); in writeRegister()