UsbCancelTransfer: Difference between revisions
Appearance
Created page with "==Description== Stops asynchronous Bulk or Interrupt Transfer with a specific endpoint. Stops asynchronous Isochronous Transfer with a specific endpoint. ==Syntax== <pre> ulr..." |
updated whole page |
||
Line 1: | Line 1: | ||
==Description== | ==Description== | ||
Stops asynchronous | Stops asynchronous Control/Data Transfer with a specific endpoint. | ||
Stops asynchronous Isochronous | Stops asynchronous Isochronous Transfers with a specific endpoint. | ||
==Syntax== | ==Syntax== | ||
<pre> | <pre> | ||
ulrc=UsbCancelTransfer(Handle, | ulrc = UsbCancelTransfer(Handle,ucEndpoint,ucAltSetting,ulEvent) | ||
</pre> | </pre> | ||
==Parameters== | ==Parameters== | ||
; Handle : | ; Handle : the Device Handle received from the previous UsbOpen. | ||
; Endpoint | ; ucEndpoint : the Endpoint Number appropriate for the asynchronous transfer. | ||
; | ; ucAltSetting : the Alternate Setting of the interface having this endpoint. | ||
; ulEvent : | ; ulEvent : the handle of the event semaphore to be posted on completion. | ||
==Return Code== | ==Return Code== | ||
<pre> | |||
0x0000 - NO_ERROR | |||
</pre> | |||
===Errors=== | ===Errors=== | ||
<pre> | |||
0x0057 - ERROR_INVALID_PARAMETER | |||
0x1B58 - USB_NOT_INIT | |||
</pre> | |||
==Remarks== | ==Remarks== | ||
==Example Code== | ==Example Code== | ||
<pre> | <pre> | ||
//Code Snippet - UsbCancelTransfer | |||
{ | |||
// cancel asynchronous control/data or isochronous transfers | |||
ulrc = UsbCancelTransfer(Handle,ucEndpoint,ucAltSetting,ulEvent); | |||
} | |||
</pre> | </pre> | ||
==Related Functions== | ==Related Functions== | ||
[[Category:USBCalls]] | [[Category:USBCalls]] |
Revision as of 17:27, 4 February 2017
Description
Stops asynchronous Control/Data Transfer with a specific endpoint. Stops asynchronous Isochronous Transfers with a specific endpoint.
Syntax
ulrc = UsbCancelTransfer(Handle,ucEndpoint,ucAltSetting,ulEvent)
Parameters
- Handle
- the Device Handle received from the previous UsbOpen.
- ucEndpoint
- the Endpoint Number appropriate for the asynchronous transfer.
- ucAltSetting
- the Alternate Setting of the interface having this endpoint.
- ulEvent
- the handle of the event semaphore to be posted on completion.
Return Code
0x0000 - NO_ERROR
Errors
0x0057 - ERROR_INVALID_PARAMETER 0x1B58 - USB_NOT_INIT
Remarks
Example Code
//Code Snippet - UsbCancelTransfer { // cancel asynchronous control/data or isochronous transfers ulrc = UsbCancelTransfer(Handle,ucEndpoint,ucAltSetting,ulEvent); }