Вы здесь

U2C_RW_Pack()

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

[Warning]Warning
This function is implemented only for Linux and Mac versions of the library.

The U2C_RW_Pack() function executes a list (pack) of I2C read/write transactions. All transactions are sent to U2C-12 device in a single USB transfer block.U2C_RW_Pack() waits until all I2C transactions are completed and returns each transaction result code in pTransaction[i].rc element. I2C transactions are performed sequentially in the same order as they are in the pack. 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 I2C transactions.

count

Number of I2C transactions in the pTransaction list.

Return values:

U2C_SUCCESS

Operation was successfully completed and pList is filled with valid data.

U2C_HARDWARE_NOT_FOUND

U2C-12 device referenced by hDevice handle was not found.

U2C_BAD_PARAMETER

I2C transactions list is too big.

Rating: 
Голосов пока нет

Языки

Вход на сайт