Jump to content

UsbIsoOpen: Difference between revisions

From EDM2
Created page with "==Description== Allocates bandwidth and resources for Isochronous Transfer. ==Syntax== <pre> ulrc=UsbIsoOpen(Handle,Endpoint,AltInterface,usBufferCount,usFrameLength) </pre> ..."
 
W.m.brul (talk | contribs)
updated whole page
Line 4: Line 4:
==Syntax==
==Syntax==
<pre>
<pre>
ulrc=UsbIsoOpen(Handle,Endpoint,AltInterface,usBufferCount,usFrameLength)
ulrc = UsbIsoOpen(Handle,ucEndpoint,ucAltSetting,usBufferCount,usFrameLength)
</pre>
</pre>


==Parameters==
==Parameters==
; Handle :  
; Handle : the Device Handle received from the previous UsbOpen.


; Endpoint :
; ucEndpoint : the Endpoint Number appropriate for the data transfer.


; AltInterface :  
; ucAltSetting : the Alternate Setting of the interface having this endpoint.


; usBufferCount :  
; usBufferCount : the number of isochronous data buffers. Must not exceed 8.


; usFrameLength :  
; usFrameLength : the maximum number of bytes in an isochronous frame.


==Return Code==
==Return Code==
 
<pre>
0x0000 - NO_ERROR
</pre>
===Errors===
===Errors===
 
<pre>
0x0037 - ERROR_DEV_NOT_EXIST
0x0057 - ERROR_INVALID_PARAMETER
0x1B58 - USB_NOT_INIT
0xFF13 - USB_IDC_PARMERR
0xFF14 - USB_IDC_ALLOCERR
0xFF15 - USB_IDC_NOBANDWIDTH
0xFF18 - USB_IDC_ADDRINV
</pre>
==Remarks==
==Remarks==


==Example Code==
==Example Code==
<pre>
<pre>
//Code Snippet - UsbIsoOpen
{
  APIRET ulrc;
  UCHAR ucAltSetting = 1;
  UCHAR ucEndpoint = 0x86;
  USHORT usBufferCount = 3;
  USHORT usFrameLength = 0x44;
  ulrc = UsbIsoOpen(Handle,ucEndpoint,ucAltSetting,usBufferCount,usFrameLength);
  printf("\nUsbIsoOpen - ulrc: 0x%04X (%hu)",ulrc,ulrc);
}
</pre>
</pre>
==Related Functions==
==Related Functions==


[[Category:USBCalls]]
[[Category:USBCalls]]

Revision as of 11:21, 7 February 2017

Description

Allocates bandwidth and resources for Isochronous Transfer.

Syntax

ulrc = UsbIsoOpen(Handle,ucEndpoint,ucAltSetting,usBufferCount,usFrameLength)

Parameters

Handle
the Device Handle received from the previous UsbOpen.
ucEndpoint
the Endpoint Number appropriate for the data transfer.
ucAltSetting
the Alternate Setting of the interface having this endpoint.
usBufferCount
the number of isochronous data buffers. Must not exceed 8.
usFrameLength
the maximum number of bytes in an isochronous frame.

Return Code

0x0000 - NO_ERROR

Errors

0x0037 - ERROR_DEV_NOT_EXIST
0x0057 - ERROR_INVALID_PARAMETER
0x1B58 - USB_NOT_INIT
0xFF13 - USB_IDC_PARMERR
0xFF14 - USB_IDC_ALLOCERR
0xFF15 - USB_IDC_NOBANDWIDTH
0xFF18 - USB_IDC_ADDRINV

Remarks

Example Code

//Code Snippet - UsbIsoOpen
{
  APIRET ulrc;
  UCHAR ucAltSetting = 1;
  UCHAR ucEndpoint = 0x86;
  USHORT usBufferCount = 3;
  USHORT usFrameLength = 0x44;

  ulrc = UsbIsoOpen(Handle,ucEndpoint,ucAltSetting,usBufferCount,usFrameLength);
  printf("\nUsbIsoOpen - ulrc: 0x%04X (%hu)",ulrc,ulrc);
}

Related Functions