Chapter 14
360
Table 14-1: The WinUsb_SetPipePolicy function can specify how the driver
responds to various conditions when performing a transfer and whether data
bypasses WinUSB’s queuing and error handling.
2CTCOGVGT 8CNWG &GHCWNV &GUETKRVKQP
SHORT_PACKET_TERMINATE 01h False If True, terminate a write transfer
that is a multiple of wMaxPacketSize
with a ZLP.
AUTO_CLEAR_STALL 02h False If True, clear a stall condition
automatically.
PIPE_TRANSFER_TIMEOUT 03h Zero Set a transfer timeout interval in
milliseconds. Zero = never time out.
IGNORE_SHORT_PACKETS 04h False If True, complete a read operation
only on receiving the specified
number of bytes. If False, complete a
read operation on receiving the
specified number of bytes or a short
packet.
ALLOW_PARTIAL_READS 05h True Sets the policy if the endpoint
returns more data than requested. If
True, complete the read operation
and save or discard the extra data as
specified by AUTO_FLUSH. If
False, fail the read request.
AUTO_FLUSH 06h False If True and
ALLOW_PARTIAL_READS is also
True, discard extra data. If False and
ALLOW_PARTIAL_READS is
True, save extra data and return it in
the next read operation. If
ALLOW_PARTIAL_READS is
False, ignore.
RAW_IO 07h False Determines whether calls to
WinUsb_ReadPipe bypasses
WinUSB's queuing and error
handling, If True, calls pass directly
to the USB stack, and the read buffer
must be a multiple of
wMaxPacketSize and less than the
host controller’s maximum per
transfer. If False, calls don’t pass
directly to the USB stack, and the
buffers don’t have the size
restrictions.