Dimax English Dimax French Dimax English Dimax Translations
USB-I2C/SPI/GPIO Interface Adapter - U2C-12
Reference Manual

U2C_RW_Pack


U2C_RESULT U2C_RW_Pack (
            HANDLE hDevice,
             PU2C_TRANSACTION_PACK pTransaction,
             int count
);
 

Warning:
This function is implemented only for Linux and Mac versions of the library.
The U2C_RW_Pack function will execute a list (pack) of I2C read/write transactions. All transactions will be sent to U2C-12 device in a single USB transfer block. Next U2C_RW_Pack will wait for completion of each I2C transaction. I2C transactions will be performed sequentially according to the pack. Each transaction result code will be returned in pTransaction[i].rc element. You should take care to pack correct sequence of the transactions. For instance attempt to read/write after write to I2C EEPROM may timeout because of the internal EEPROM write cycle.

Parameters:
hDevice Handle to the U2C-12 device.
pTransaction List of the I2C transactions.
count Number of the I2C transactions in the pTransaction list.
Return values:
U2C_SUCCESS The data was successfully written.
U2C_HARDWARE_NOT_FOUND U2C-12 device referenced by hDevice handle was not found.
U2C_BAD_PARAMETER I2C transactions list is too big.
            Copyright DIMAX 2002-2012