sub_i2c_transfer

Top  Previous  Next
Got to SUB-20 page

Synopsis

int sub_i2c_transfer( sub_handle hndl, int sa,

                 char* wr_buf, int wr_buf_sz, char* rd_buf, int rd_buf_sz )

 

Perform I2C master write transaction followed by master read transaction. Transactions will have following format:

 

sub_i2c_transfer

 

Function has no limitation of the read data size - rd_buf_sz parameter. However internal organization of the I2C slave device being read should be considered.

Parameters

sa - Slave Address

wr_buf - Buffer for data to be written

wr_buf_sz - Write data size bytes

rd_buf - Buffer for data to be read

rd_buf_sz - Read data size bytes

Return value

On success function returns 0. Otherwise error code.

See also

Error Codes, I2C Status

Compatibility

FW version

0.4.4 or grater

Library version

0.1.12.32 or grater