IssueIsochTransfer
This function initiates an isochronous transfer with a USB device.
USB_TRANSFER IssueIsochTransfer(
USB_PIPE hPipe,
LPTRANSFER_NOTIFY_ROUTINE lpStartAddress,
LPVOID lpvNotifyParameter,
DWORD dwFlags,
DWORD dwStartingFrame,
DWORD dwFrames,
LPCDWORD lpdwLengths,
LPVOID lpvBuffer,
ULONG uBufferPhysicalAddress
);
Parameters
- hPipe
[in] Handle to an open USB pipe. - lpStartAddress
[in] Pointer to the address of a callback routine, or NULL if no callback routine is necessary. Any value other than NULL causes this function to act asynchronously, that is, to return immediately, before the transfer is complete, as if USB_NO_WAIT had been included in dwFlags. - lpvNotifyParameter
[in] Pointer to the parameter to pass to a callback routine. - dwFlags
[in] Flags for the transfer. Some flags are specific to isochronous transfers. USB_START_ISOCH_ASAP starts transfer as soon as possible, instead of specifying a starting frame. USB_COMPRESS_ISOCH guarantees, for IN transfers, that data is copied contiguously to the user buffer, instead of being fragmented if the amount of data is less than the maximum requested for a particular frame. USB_COMPRESS_ISOCH only works if you do not specify a physical address. USB_NO_WAIT causes the function to act asynchronously. These flags shown in the following list are declared in the Usbtypes.h header file.- USB_IN_TRANSFER
- USB_OUT_TRANSFER
- USB_NO_WAIT
- USB_SHORT_TRANSFER_OK
- USB_START_ISOCH_ASAP
- USB_COMPRESS_ISOCH
- USB_SEND_TO_DEVICE
- USB_SEND_TO_INTERFACE
- USB_SEND_TO_ENDPOINT
- USB_DONT_BLOCK_FOR_MEM
- dwStartingFrame
[in] Frame number on which the transfer starts. - dwFrames
[in] Number of frames in the transfer. - lpdwLengths
[in] Pointer to an array of lengths, one entry per frame. Do not free this until the transfer completes. - lpvBuffer
[in] Pointer to a data buffer. If a physical buffer address is specified, this must contain the virtual address of the buffer. Do not free this until the transfer completes. - uBufferPhysicalAddress
[in] Physical address, which may be NULL, of the data buffer.
Return Values
A USB_TRANSFER handle indicates success. NULL indicates failure.
Remarks
This function initiates an isochronous transfer to a USB device on the specified endpoint. Because isochronous transfers must execute continuously, a sequence of buffers is provided, one of which is transferred for each frame. There is no limit on the number of buffers that may be provided, though each one must be less than or equal to the maximum packet size for the endpoint.
If a USB client driver calls IssueIsochTransfer with the USB_NO_WAIT flag and with a callback function specified in lpStartAddress, then the USB client driver must not call CloseTransfer or AbortTransfer before the isochronous transfer has completed, that is, before the callback function has been invoked.
IssueIsochTransfer behaves either synchronously or asynchronously, depending on the value you provide for lpStartAddress and whether dwFlags contains the USB_NO_WAIT flag. The following table shows the possible flags.
lpStartAddress | dwFlags | USB_NO_WAIT | Behavior |
---|---|---|
NULL | 0 | Synchronous |
NULL | USB_NO_WAIT | Asynchronous |
Non-NULL | 0 | Asynchronous |
Non-NULL | USB_NO_WAIT | Asynchronous |
When behaving asynchronously, the function invokes your callback function, if lpStartAddress specifies one, when the transfer is complete.
Requirements
OS Versions: Windows CE 2.10 and later.
Header: Usbd.hpp.
See Also
AbortTransfer | CloseTransfer | GetIsochResults | GetTransferStatus | IsTransferComplete | USB Drivers
Last updated on Tuesday, May 18, 2004
© 1992-2003 Microsoft Corporation. All rights reserved.