C API for BALTECH SDK

§ brp_I2c_TxRx()

brp_errcode brp_I2c_TxRx ( brp_protocol  protocol,
unsigned  Address,
brp_buf  CmdData,
size_t  CmdData_len,
unsigned  ReadLen,
brp_buf ReadData,
size_t *  ReadData_len,
brp_mempool mempool 
)

Write data and directly after that read from I2C interface.

Parameters
[in]protocolused to execute the command
[in]AddressI2C device address.
[in]CmdDataCommand Data to write before reading (e.g. start address).
[in]CmdData_len
[in]ReadLenNumber of bytes to read.
[out]ReadDataData read from I2C interface.
[out]ReadData_len
[in]mempoolis used to store response data. Maybe NULL to use an internal mempool, in this case the data is only available until another command uses the internal mempool