4 waitfordevicerequest instruction, Waitfordevicerequest instruction – Teledyne LeCroy Voyager Exerciser Generation Script Language Manual User Manual
Page 74

Teledyne LeCroy
Voyager USB 3.0 Exerciser Generation Script Language Reference Manual
65
DeviceProtocol = 0x00
MaxPacketSize0 = 0x200
dVendor = 0x0423
dProduct = 0x0001
bcdDevice = 0x0002
Manufacturer = 0x01
Product = 0x02
SerialNumber = 0x03
NumConfigurations = 1
}
AddDescriptor( DEVICE_DESC, 0 )
{
DescriptorData
{
Data = $DeviceDescriptorPayLoad
}
}
…
# - String descriptor for Manufacturer
AddDescriptor( STRING_DESC, 1, 0, 0, 0x0409 )
{
DescriptorData
{
# "LeCroy Corporation"
Data = { 28 03 4C 00 65 00 43 00 72 00 6F 00 79 00 20 00
43 00 6F 00 72 00 70 00 6F 00 72 00 70 00 61 00
74 00 69 00 6F 00 6E 00 }
}
}
…
}
9.2.4 WaitForDeviceRequest Instruction
This instruction allows synchronizing the execution of the automatic Device Framework Handler
with the rest of the script. A typical device emulation script includes a portion that starts and
configures the Device Framework Handler and a portion that adds some script code to handle
communication with the driver/application when they load. The second portion needs to wait and
allow the Device Framework Handler, which only deals with Standard device requests, to handle
the system and initial driver enumeration.
This instruction can be used to wait for a specific Standard request that is sent at the end of the
standard driver enumeration. In this case, no additional processing is required for this request, as
it is handled by the Device Framework Handler. Alternatively, the script can be waiting for the first
Class- or Vendor-specific request sent by the driver. In this case, the Setup stage for the request
is automatically acknowledged, but data and status stage needs processing by the script itself.
Format