4. API function reference
Page.4-16
I2C bus operation on I2C bus master mode
VC
RS_STATUS
usb61_i2c_read_master( HANDLE hUsb61Device,
USHORT SlaveAddress, UINT fI2cOption,
USHORT ReadBytes, UCHAR *pReadBuf );
VB
Function
Usb61I2cReadMaster(ByVal hUsb61Device As Long,
ByVal SlaveAddress As Integer, ByVal fI2cOption As Long,
ByVal ReadBytes As Integer, pReadBuf As Byte) As Long
Definition
VB.NET
Function
Usb61I2cReadMaster(ByVal hUsb61Device As Integer,
ByVal slaveAddress 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.
Parameters
[IN] hUsb61Device : handle of an REX-USB61 device
[IN] SlaveAddress : the slave from which to read. See the below
[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.
*Slave address:
Specify the slave address in 7bits or 10bits, not includes R/W bit.
A6 A5 A4 A3 A2 A1
A0
R/W
Slave address
[Examples : slave address = 52h ]
0 1 0 1 0 0 1 0 R/W
5
2
Содержание REX-USB61
Страница 1: ...USB SPI I2C Protocol Emulator 2013 10 Rev 1 0 ...
Страница 75: ...RATOC Systems Inc All rights reserved ...