![Ratoc Systems REX-USB61 Скачать руководство пользователя страница 65](http://html.mh-extra.com/html/ratoc-systems/rex-usb61/rex-usb61_user-manual_788102065.webp)
4. API function reference
Page.4-20
VC
No use on VC
VB
Function
Usb61GetData(ByVal wParam As Long,
ByVal lParam As Long, pBuf As Byte) As Long
Definition
VB.NET
Function
Usb61GetData(ByVal wParam As Integer,
ByVal lParam As Integer, ByRef pBuf As Object) As Integer
Description
Get the data by using the “Usb61I2cReadSlave” function, when the
"WM_USB61_MSG" message is posted
Parameters
[IN] wParam : the number of bytes to read
[IN] lParam : address of the data to read
[OUT]
pBuf : pointer to the data to read
Example on VB:
Private Sub Usb61api_OnEventMsg(ByVal wParam As Long, ByVal lParam As Long)
' Status code
Dim rsStatus As Long
Dim pBuf() As Byte
ReDim pBuf(wParam) As Integer
rsStatus = Usb61api.Usb61GetData(wParam, lParam, pBuf)
End Sub
Return
Values
RS_SUCCESS Function call always succeeded.
VC
RS_STATUS
usb61_i2c_set_response_data( HANDLE hUsb61Device,
USHORT ResponseBytes, UCHAR *pResponseBuf);
VB
Function
Usb61I2cSetResponseData(ByVal hUsb61Device As Long,
ByVal ResponseBytes As Integer,
ByVal pResponseBuf As Byte) As Long
Definition
VB.NET
Function
Usb61I2cSetResponseData(ByVal hUsb61Device As Integer,
ByVal responseBytes As Short,
ByVal pResponseBuf As Object) As Integer
Description
Set the data for sending to master device on I2C slave mode
When receive data from master device, send the data pre-set for master
Parameters
[IN] hUsb61Device : handle of an REX-USB61 device
[IN] ResponseBytes :the number of bytes for sending to master device
[IN] pResponseBuf :pointer to the data for sending to master device
Return
Values
RS_SUCCESS Function call succeeded.
Error code (refer. 4-5) Function call failed.
Содержание REX-USB61
Страница 1: ...USB SPI I2C Protocol Emulator 2013 10 Rev 1 0 ...
Страница 75: ...RATOC Systems Inc All rights reserved ...