Download USB4 Manual - US Digital

Transcript
Example C Usage:
int iResult = USB4_SUCCESS;
short iDeviceNo = 0;
BOOL bTriggerOutSignalDrivesOutputPin[5] = {1, 0, 0, 0, 0};
unsigned char ucTriggerSignalLengthCode = 1;
iResult = USB4_SetOutputPortConfig(iDeviceNo, bTriggerOutSignalDrivesOutputPin,
ucTriggerSignalLengthCode);
if ( iResult != USB4_SUCCESS ){ // Handle error...}
VB Language Function Declaration:
Public Declare Function USB4_SetOutputPortConfig Lib "USB4.dll" (ByVal iDeviceNo As
Integer, ByRef pbTriggerOutSignalDrivesOutputPin As Long, ByVal
ucTriggerSignalLengthCode As Byte) As Long
Example VB Usage:
Dim
Dim
Dim
Dim
errCode As Long
iDeviceNo As Integer
bTriggerOutSignalDrivesOutputPin(4) As Long
bytTriggerSignalLengthCode As Byte
iDeviceNo = 0
bTriggerOutSignalDrivesOutputPin(0) = 1
bytTriggerSignalLengthCode = 1
errCode = USB4_SetOutputPortConfig(iDeviceNo, _
bTriggerOutSignalDrivesOutputPin, _
bytTriggerSignalLengthCode)
If errCode <> USB4_SUCCESS then
‘ Handle error...
End If
143