These flags are available beginning with version 5.0.4 of WinDriver.
When the USB_SHORT_TRANSFER flag is set, then
WD_UsbTransfer() will return on one of two
occasions:
- A short packet (i.e., less than the maximum packet size) was
transferred or the device transferred a zero (0) packet, to indicate a
short transfer. In this case fOk will be
TRUE.
- The time-out period (specified in
usbTrans.dwTimeout) expired before a short
packet was transferred (or a zero packet was received). In this case
fOk will be
FALSE.
When the USB_FULL_TRANSFER flag is set, then
WD_UsbTransfer() will return on one of the
following two occasions:
- The entire buffer (usbTrans.dwBytes)
was filled/written. In this case
fOk will be
TRUE.
- The time-out period expired before the buffer was entirely
filled/written. In this case fOk will be
FALSE (although some data may very well
have been transferred).
By default, the USB_SHORT_TRANSFER
flag is set for bulk and interrupt transfers and the
USB_FULL_TRANSFER flag is set for
isochronous transfers. Control transfers are always short
transfers.
In former versions of WinDriver (until, and including, v5.0.3),
WD_UsbTransfer() behaved (for all types of
transfers) as described above for the
USB_SHORT_TRANSFER flag in v5.0.4 and above —
i.e., the function always returned on one of two occasions:
- A short packet (i.e., less than the maximum packet size) was
transferred or the device transferred a zero (0) packet, to indicate a
short transfer — in which case fOK
would have been TRUE (even if the buffer
was not entirely filled/written).
- The time-out expired without any such transfer — in which case
fOK would be
FALSE.
|