![]()  | 
     BALTECH Docs | 
    C API for BALTECH SDK
   
    
   
   | 
   
| 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.
| [in] | protocol | used to execute the command | 
| [in] | Address | I2C device address. | 
| [in] | CmdData | Command Data to write before reading (e.g. start address). | 
| [in] | CmdData_len | |
| [in] | ReadLen | Number of bytes to read. | 
| [out] | ReadData | Data read from I2C interface. | 
| [out] | ReadData_len | |
| [in] | mempool | is 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 |