UsbSetup Procedure

Version 7

 

Sets the specified USB device characteristics.

Syntax

[ lStatus = ] UsbSetup (hDevice, bUSBTMC, lInterfaceNumber, lConfigurationIndex )

The UsbSetup procedure syntax has the following parts:

 

Name

Type

Description

lStatus

Long

Status: -1 = error, 0 = success

hDevice

Val AHandle

Handle to the USB device

bUSBTMC

[Val] Bool

True=USBTMC mode (default), False=RAW mode

lInterfaceNumber

[Val] Long

Current Interface Number (Default=-1)

lConfigurationIndex

[Val] Long

Current Configuration Index (Default=-1)

Remarks

By default, UsbOpen will select the first configuration and interface to be used as default in RAW mode. UsbSetup is used to select a new mode, configuration, or interface.

When bUSBTMC=True, ATEasy will automatically select the interface and configuration which support USBTMC mode, and lInterfaceNumber and lConfiguration are ignored.

Example

The following example selects USBTMC mode:

UsbSetup(hDevice, True)

See Also

UsbOpen, UsbClose