![Ratoc Systems REX-USB61 Скачать руководство пользователя страница 63](http://html.mh-extra.com/html/ratoc-systems/rex-usb61/rex-usb61_user-manual_788102063.webp)
4. API function reference
Page.4-18
VC
RS_STATUS
usb61_i2c_write_master( HANDLE hUsb61Device,
USHORT SlaveAddress,UINT fI2cOption,
USHORT WriteBytes,UCHAR *pWriteBuf );
VB
Function
Usb61I2cWriteMaster(ByVal hUsb61Device As Long,
ByVal SlaveAddress As Integer,
ByVal fI2cOption As Long,
ByVal WriteBytes As Integer,
ByVal pWriteBuf As Byte) As Long
Definition
VB.NET
Function
Usb61I2cWriteMaster(ByVal hUsb61Device As Integer,
ByVal slaveAddress As Short,
ByVal fI2cOption As Integer,
ByVal writeBytes As Short,
ByVal pWriteBuf As Object) As Integer
Description
Write a stream of bytes to the I2C slave device
Parameters
[IN] hUsb61Device : handle of an REX-USB61 device
[IN] SlaveAddress : the slave from which to read.
See *Slave address in Page4-16.
[IN] fI2cOption : special operation as described in "Table 4-2" and below
[IN] WriteBytes : the number of bytes to write
[IN] pWriteBuf : pointer to data to write
Return
Values
RS_SUCCESS Function call succeeded.
Error code (refer. 4-5) Function call failed.
Table 4-2. Special operation on I2C bus
Literal Name
Value
Description
RS_I2C_FLAG_NONE 0x00
No
flags.
RS_I2C_FLAG_10BIT_ADDR 0x01 For 10-bits address device
RS_I2C_FLAG_STOP
0x02
Set before issue the stop condition
RS_I2C_FLAG_1BYTE_SA
0x04
Send 1 byte sub-address before reading data
RS_I2C_FLAG_2BYTE_SA
0x0C
Send 2 bytes sub-address before reading data
Содержание REX-USB61
Страница 1: ...USB SPI I2C Protocol Emulator 2013 10 Rev 1 0 ...
Страница 75: ...RATOC Systems Inc All rights reserved ...