![Ratoc Systems REX-USB61 User Manual Download Page 62](http://html.mh-extra.com/html/ratoc-systems/rex-usb61/rex-usb61_user-manual_788102062.webp)
4. API function reference
Page.4-17
VC
RS_STATUS
usb61_i2c_read_master_ex(HANDLE hUsb61Device,
USHORT SlaveAddress, USHORT SubAddress,
UINT fI2cOption, USHORT ReadBytes,
UCHAR *pReadBuf );
VB
Function
Usb61I2cReadMasterEx(ByVal hUsb61Device As Long,
ByVal SlaveAddress As Integer,
ByVal SubAddress As Integer,
ByVal fI2cOption As Long,
ByVal ReadBytes As Integer,
pReadBuf As Byte) As Long
Definition
VB.NET
Function
Usb61I2cReadMasterEx(ByVal hUsb61Device As Integer,
ByVal slaveAddress As Short, ByVal subAddress As Short,
ByVal fI2cOption As Integer, ByVal readBytes As Short,
ByRef pReadBuf As Object) As Integer
Description
Read a stream of bytes from the I2C slave device with sub-address.
It is different from the "usb61_i2c_read_master" function that write data
before for reading with the specifying the calling position (specifying
sub-address) on inside function.
Parameters
[IN] hUsb61Device : handle of an REX-USB61 device
[IN] SlaveAddress : the slave from which to read.
See *Slave address in Page4-16.
[IN] SubAddress : Sub address (supports 2 bytes-address)
[IN] fI2cOption : special operation as described in "Table 4-2" and below
[IN] ReadBytes : the number of bytes to read
[OUT] pReadBuf : pointer to data to read.
Return
Values
RS_SUCCESS Function call succeeded.
Error code (refer. 4-5) Function call failed.