![Ratoc Systems REX-USB61 Скачать руководство пользователя страница 59](http://html.mh-extra.com/html/ratoc-systems/rex-usb61/rex-usb61_user-manual_788102059.webp)
4. API function reference
Page.4-14
VC
RS_STATUS
usb61_i2c_pullup( HANDLE hUsb61Device,
RS_I2C_PULLUP fI2cPullup);
VB
Function
Usb61I2cPullup(ByVal hUsb61Device As Long,
ByVal fI2cPullup As Integer) As Long
Definition
VB.NET
Function
Usb61I2cPullup(ByVal hUsb61Device As Integer,
ByVal fI2cPullup As Short) As Integer
Description
Set pullup on I2C bus. (Each pin of SDA and SCL)
Parameters
[IN] hUsb61Device : handle of an REX-USB61 device
[IN] fI2cPullup : pullup setting
Set the value
by using the defined symbol as the following:
RS_I2C_PULLUP_DISABLE Not set pull-up the pin SCL and SDA.
RS_I2C_PULLUP_ENABLE Set pull-up the pin of SCL and SDA.
* When I2C, SPI mode, always set ENABLE.(Can select only 1MHz I2C
mode)
Return
Values
RS_SUCCESS Function call succeeded.
Error code (refer. 4-5) Function call failed.
GPO (Only on I2C mode)
VC
RS_STATUS
usb61_gpo_write( HANDLE hUsb61Device,
UINT fPortVal );
VB
Function
Usb61GpoWrite(ByVal hUsb61Device As Long,
ByVal fPortVal As Long) As Long
Definition
VB.NET
Function
Usb61GpoWrite(ByVal hUsb61Device As Integer,
ByVal fPortVal As Integer) As Integer
Description
Output to the GPO pin on I2C mode.
Parameters
[IN] hUsb61Device : handle of an REX-USB61 device
[IN] fPortVal : a bitmask specifying which outputs to GPO pin.
GPO line location of bit mask by using the defined symbol as the following:
RS_GPO_NONE Set Low(=0) to all port
RS_GPO_PORT0 Set High(=1) to PORT0
RS_GPO_PORT1 Set High(=1) to PORT1
RS_GPO_PORT2 Set High(=1) to PORT2
RS_GPO_PORT3 Set High(=1) to PORT3
For setting to multiple GPO port at the same time, bit operation as the
following:
example:
RS_GPO_PORT0 | RS_GPO_PORT1 output PORT1 and PORT2
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 ...