Sophie

Sophie

distrib > Mandriva > 2010.1 > x86_64 > media > main-release > by-pkgid > f48b0484566fe5f15f1edab7e7e31247 > files > 20

lib64usb1.0-devel-1.0.7-3mdv2010.1.x86_64.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>libusb: USB descriptors</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.6.3 -->
<script type="text/javascript">
<!--
function changeDisplayState (e){
  var num=this.id.replace(/[^[0-9]/g,'');
  var button=this.firstChild;
  var sectionDiv=document.getElementById('dynsection'+num);
  if (sectionDiv.style.display=='none'||sectionDiv.style.display==''){
    sectionDiv.style.display='block';
    button.src='open.gif';
  }else{
    sectionDiv.style.display='none';
    button.src='closed.gif';
  }
}
function initDynSections(){
  var divs=document.getElementsByTagName('div');
  var sectionCounter=1;
  for(var i=0;i<divs.length-1;i++){
    if(divs[i].className=='dynheader'&&divs[i+1].className=='dynsection'){
      var header=divs[i];
      var section=divs[i+1];
      var button=header.firstChild;
      if (button!='IMG'){
        divs[i].insertBefore(document.createTextNode(' '),divs[i].firstChild);
        button=document.createElement('img');
        divs[i].insertBefore(button,divs[i].firstChild);
      }
      header.style.cursor='pointer';
      header.onclick=changeDisplayState;
      header.id='dynheader'+sectionCounter;
      button.src='closed.gif';
      section.id='dynsection'+sectionCounter;
      section.style.display='none';
      section.style.marginLeft='14px';
      sectionCounter++;
    }
  }
}
window.onload = initDynSections;
-->
</script>
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
<h1>USB descriptors</h1>
<p>This page details how to examine the various standard USB descriptors for detected devices.  
<a href="#_details">More...</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Data Structures</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlibusb__device__descriptor.html">libusb_device_descriptor</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A structure representing the standard USB device descriptor.  <a href="structlibusb__device__descriptor.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlibusb__endpoint__descriptor.html">libusb_endpoint_descriptor</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A structure representing the standard USB endpoint descriptor.  <a href="structlibusb__endpoint__descriptor.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlibusb__interface__descriptor.html">libusb_interface_descriptor</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A structure representing the standard USB interface descriptor.  <a href="structlibusb__interface__descriptor.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlibusb__interface.html">libusb_interface</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A collection of alternate settings for a particular USB interface.  <a href="structlibusb__interface.html#_details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structlibusb__config__descriptor.html">libusb_config_descriptor</a></td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">A structure representing the standard USB configuration descriptor.  <a href="structlibusb__config__descriptor.html#_details">More...</a><br/></td></tr>
<tr><td colspan="2"><h2>Enumerations</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__desc.html#gac529888effbefef8af4f9d17ebc903a1">libusb_class_code</a> { <br/>
&nbsp;&nbsp;<a class="el" href="group__desc.html#ggac529888effbefef8af4f9d17ebc903a1ac6d01c08f92219d625162271d9547550">LIBUSB_CLASS_PER_INTERFACE</a> =  0, 
<a class="el" href="group__desc.html#ggac529888effbefef8af4f9d17ebc903a1a1f87be5c5c32c30e1e6831abdb61461a">LIBUSB_CLASS_AUDIO</a> =  1, 
<a class="el" href="group__desc.html#ggac529888effbefef8af4f9d17ebc903a1a7db61f0ea65d1919962ac0370513183b">LIBUSB_CLASS_COMM</a> =  2, 
<a class="el" href="group__desc.html#ggac529888effbefef8af4f9d17ebc903a1ad126069ffbc9cb3cda97fe0fe8c190f3">LIBUSB_CLASS_HID</a> =  3, 
<br/>
&nbsp;&nbsp;<a class="el" href="group__desc.html#ggac529888effbefef8af4f9d17ebc903a1ab1592f5d41d4ee3ccfe0adef8cbf04ee">LIBUSB_CLASS_PRINTER</a> =  7, 
<a class="el" href="group__desc.html#ggac529888effbefef8af4f9d17ebc903a1abcd1d4f42671058f70ab9ae41c5ce303">LIBUSB_CLASS_PTP</a> =  6, 
<a class="el" href="group__desc.html#ggac529888effbefef8af4f9d17ebc903a1ac84d2301375aef28bf5c3f4bda35f9d1">LIBUSB_CLASS_MASS_STORAGE</a> =  8, 
<a class="el" href="group__desc.html#ggac529888effbefef8af4f9d17ebc903a1a28ba55c39b90ba3f281542e4ffdb626d">LIBUSB_CLASS_HUB</a> =  9, 
<br/>
&nbsp;&nbsp;<a class="el" href="group__desc.html#ggac529888effbefef8af4f9d17ebc903a1aa18621124b0db0f8972556647ad16827">LIBUSB_CLASS_DATA</a> =  10, 
<a class="el" href="group__desc.html#ggac529888effbefef8af4f9d17ebc903a1aaeea39cf3f500f56381cd6e05132d934">LIBUSB_CLASS_WIRELESS</a> =  0xe0, 
<a class="el" href="group__desc.html#ggac529888effbefef8af4f9d17ebc903a1a3a95beae54453469c4862efc1606dcc9">LIBUSB_CLASS_APPLICATION</a> =  0xfe, 
<a class="el" href="group__desc.html#ggac529888effbefef8af4f9d17ebc903a1ad68e1d33a332360428f838c6ddd847f6">LIBUSB_CLASS_VENDOR_SPEC</a> =  0xff
<br/>
 }</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>Device and/or Interface Class codes. </p>
 <a href="group__desc.html#gac529888effbefef8af4f9d17ebc903a1">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__desc.html#ga0a2e8a25dfdebf29fdd4764dcdbc1a9c">libusb_descriptor_type</a> { <br/>
&nbsp;&nbsp;<a class="el" href="group__desc.html#gga0a2e8a25dfdebf29fdd4764dcdbc1a9ca486e222e9f3053502ce4954a5bd89ba2">LIBUSB_DT_DEVICE</a> =  0x01, 
<a class="el" href="group__desc.html#gga0a2e8a25dfdebf29fdd4764dcdbc1a9ca2a3f906d7755932ab67f39701da0b508">LIBUSB_DT_CONFIG</a> =  0x02, 
<a class="el" href="group__desc.html#gga0a2e8a25dfdebf29fdd4764dcdbc1a9ca2b8ca4332dce1357767ecab20ed2f4c2">LIBUSB_DT_STRING</a> =  0x03, 
<a class="el" href="group__desc.html#gga0a2e8a25dfdebf29fdd4764dcdbc1a9ca797f18e35ee27434562aed0c20c46b78">LIBUSB_DT_INTERFACE</a> =  0x04, 
<br/>
&nbsp;&nbsp;<a class="el" href="group__desc.html#gga0a2e8a25dfdebf29fdd4764dcdbc1a9ca97df43465eec9e6db81346f521777815">LIBUSB_DT_ENDPOINT</a> =  0x05, 
<a class="el" href="group__desc.html#gga0a2e8a25dfdebf29fdd4764dcdbc1a9ca3085fb63563770bfa1ede7b27cbf4f5e">LIBUSB_DT_HID</a> =  0x21, 
<a class="el" href="group__desc.html#gga0a2e8a25dfdebf29fdd4764dcdbc1a9ca3972f13fb6b6abdb0978dc43d9d24e6f">LIBUSB_DT_REPORT</a> =  0x22, 
<a class="el" href="group__desc.html#gga0a2e8a25dfdebf29fdd4764dcdbc1a9ca77c22f3dc80f2a505c22c68cc54c70d3">LIBUSB_DT_PHYSICAL</a> =  0x23, 
<br/>
&nbsp;&nbsp;<a class="el" href="group__desc.html#gga0a2e8a25dfdebf29fdd4764dcdbc1a9ca2186edbc7dc05b063ac41103a5ccfa9a">LIBUSB_DT_HUB</a> =  0x29
<br/>
 }</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>Descriptor types as defined by the USB specification. </p>
 <a href="group__desc.html#ga0a2e8a25dfdebf29fdd4764dcdbc1a9c">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__desc.html#ga86c880af878493aa8f805c2aba654b8b">libusb_endpoint_direction</a> { <a class="el" href="group__desc.html#gga86c880af878493aa8f805c2aba654b8ba3829979c66e5344367f32f4a31d43613">LIBUSB_ENDPOINT_IN</a> =  0x80, 
<a class="el" href="group__desc.html#gga86c880af878493aa8f805c2aba654b8ba940484c16d44bdfc6eccc2de7a9ffcb2">LIBUSB_ENDPOINT_OUT</a> =  0x00
 }</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>Endpoint direction. </p>
 <a href="group__desc.html#ga86c880af878493aa8f805c2aba654b8b">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__desc.html#gacb52027036a07de6ecc6c2bf07d07c71">libusb_transfer_type</a> { <a class="el" href="group__desc.html#ggacb52027036a07de6ecc6c2bf07d07c71a4c89624658c783ef9b2a2f08091bc7d7">LIBUSB_TRANSFER_TYPE_CONTROL</a> =  0, 
<a class="el" href="group__desc.html#ggacb52027036a07de6ecc6c2bf07d07c71a40de9889554fc1785d784b3c31333300">LIBUSB_TRANSFER_TYPE_ISOCHRONOUS</a> =  1, 
<a class="el" href="group__desc.html#ggacb52027036a07de6ecc6c2bf07d07c71a7bdfa2fc5dadbaaa0e9262e1b4a228e2">LIBUSB_TRANSFER_TYPE_BULK</a> =  2, 
<a class="el" href="group__desc.html#ggacb52027036a07de6ecc6c2bf07d07c71aefb0e07862c0eed894ec9c2f957a7e3c">LIBUSB_TRANSFER_TYPE_INTERRUPT</a> =  3
 }</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>Endpoint transfer type. </p>
 <a href="group__desc.html#gacb52027036a07de6ecc6c2bf07d07c71">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__desc.html#gaa2231202dfe12eddca49b1193d44a441">libusb_iso_sync_type</a> { <a class="el" href="group__desc.html#ggaa2231202dfe12eddca49b1193d44a441a4a74eefd565a40b4ed911baaaaea1cee">LIBUSB_ISO_SYNC_TYPE_NONE</a> =  0, 
<a class="el" href="group__desc.html#ggaa2231202dfe12eddca49b1193d44a441ab97a868cd66bfcac50f9ccf8ff0b3a67">LIBUSB_ISO_SYNC_TYPE_ASYNC</a> =  1, 
<a class="el" href="group__desc.html#ggaa2231202dfe12eddca49b1193d44a441a813f487563e5b61a8399e7512f0c303b">LIBUSB_ISO_SYNC_TYPE_ADAPTIVE</a> =  2, 
<a class="el" href="group__desc.html#ggaa2231202dfe12eddca49b1193d44a441a39244a977707c95c7f3ba0e978faba84">LIBUSB_ISO_SYNC_TYPE_SYNC</a> =  3
 }</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>Synchronization type for isochronous endpoints. </p>
 <a href="group__desc.html#gaa2231202dfe12eddca49b1193d44a441">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__desc.html#gab72474551b0eb965401e6febb856007c">libusb_iso_usage_type</a> { <a class="el" href="group__desc.html#ggab72474551b0eb965401e6febb856007ca13edfd0d36d959bcf32d5cca341c7f38">LIBUSB_ISO_USAGE_TYPE_DATA</a> =  0, 
<a class="el" href="group__desc.html#ggab72474551b0eb965401e6febb856007ca2390aa76c4444e0b590fb65f305e4485">LIBUSB_ISO_USAGE_TYPE_FEEDBACK</a> =  1, 
<a class="el" href="group__desc.html#ggab72474551b0eb965401e6febb856007ca8e48a0bad38cfaf0e87dfdc225f91e32">LIBUSB_ISO_USAGE_TYPE_IMPLICIT</a> =  2
 }</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>Usage type for isochronous endpoints. </p>
 <a href="group__desc.html#gab72474551b0eb965401e6febb856007c">More...</a><br/></td></tr>
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__desc.html#ga5e9ab08d490a7704cf3a9b0439f16f00">libusb_get_device_descriptor</a> (<a class="el" href="group__dev.html#ga77eedd00d01eb7569b880e861a971c2b">libusb_device</a> *dev, struct <a class="el" href="structlibusb__device__descriptor.html">libusb_device_descriptor</a> *desc)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the USB device descriptor for a given device.  <a href="#ga5e9ab08d490a7704cf3a9b0439f16f00"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__desc.html#ga425885149172b53b3975a07629c8dab3">libusb_get_active_config_descriptor</a> (<a class="el" href="group__dev.html#ga77eedd00d01eb7569b880e861a971c2b">libusb_device</a> *dev, struct <a class="el" href="structlibusb__config__descriptor.html">libusb_config_descriptor</a> **config)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the USB configuration descriptor for the currently active configuration.  <a href="#ga425885149172b53b3975a07629c8dab3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__desc.html#gaa635d9aec77de4895dd0896ccf001532">libusb_get_config_descriptor</a> (<a class="el" href="group__dev.html#ga77eedd00d01eb7569b880e861a971c2b">libusb_device</a> *dev, uint8_t config_index, struct <a class="el" href="structlibusb__config__descriptor.html">libusb_config_descriptor</a> **config)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get a USB configuration descriptor based on its index.  <a href="#gaa635d9aec77de4895dd0896ccf001532"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__desc.html#ga3e7bffc5d08404c4d6491e73b967bf67">libusb_get_config_descriptor_by_value</a> (<a class="el" href="group__dev.html#ga77eedd00d01eb7569b880e861a971c2b">libusb_device</a> *dev, uint8_t bConfigurationValue, struct <a class="el" href="structlibusb__config__descriptor.html">libusb_config_descriptor</a> **config)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get a USB configuration descriptor with a specific bConfigurationValue.  <a href="#ga3e7bffc5d08404c4d6491e73b967bf67"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__desc.html#ga18d2b08a065857ff7ae4f3f719c115cc">libusb_free_config_descriptor</a> (struct <a class="el" href="structlibusb__config__descriptor.html">libusb_config_descriptor</a> *config)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Free a configuration descriptor obtained from <a class="el" href="group__desc.html#ga425885149172b53b3975a07629c8dab3" title="Get the USB configuration descriptor for the currently active configuration.">libusb_get_active_config_descriptor()</a> or <a class="el" href="group__desc.html#gaa635d9aec77de4895dd0896ccf001532" title="Get a USB configuration descriptor based on its index.">libusb_get_config_descriptor()</a>.  <a href="#ga18d2b08a065857ff7ae4f3f719c115cc"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__desc.html#gaf3f92d0a7465d49a5e61eb3f8689fae4">libusb_get_string_descriptor_ascii</a> (<a class="el" href="group__dev.html#ga7df95821d20d27b5597f1d783749d6a4">libusb_device_handle</a> *dev, uint8_t desc_index, unsigned char *data, int length)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Retrieve a string descriptor in C style ASCII.  <a href="#gaf3f92d0a7465d49a5e61eb3f8689fae4"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__desc.html#ga465642422af4ba2a988e188c6c86d7f0">libusb_get_descriptor</a> (<a class="el" href="group__dev.html#ga7df95821d20d27b5597f1d783749d6a4">libusb_device_handle</a> *dev, uint8_t desc_type, uint8_t desc_index, unsigned char *data, int length)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Retrieve a descriptor from the default control pipe.  <a href="#ga465642422af4ba2a988e188c6c86d7f0"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__desc.html#gab89c2119087308c6bfa6a4be30f39bc3">libusb_get_string_descriptor</a> (<a class="el" href="group__dev.html#ga7df95821d20d27b5597f1d783749d6a4">libusb_device_handle</a> *dev, uint8_t desc_index, uint16_t langid, unsigned char *data, int length)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Retrieve a descriptor from a device.  <a href="#gab89c2119087308c6bfa6a4be30f39bc3"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<p>This page details how to examine the various standard USB descriptors for detected devices. </p>
<hr/><h2>Enumeration Type Documentation</h2>
<a class="anchor" id="gac529888effbefef8af4f9d17ebc903a1"></a><!-- doxytag: member="libusb.h::libusb_class_code" ref="gac529888effbefef8af4f9d17ebc903a1" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__desc.html#gac529888effbefef8af4f9d17ebc903a1">libusb_class_code</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Device and/or Interface Class codes. </p>
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="ggac529888effbefef8af4f9d17ebc903a1ac6d01c08f92219d625162271d9547550"></a><!-- doxytag: member="LIBUSB_CLASS_PER_INTERFACE" ref="ggac529888effbefef8af4f9d17ebc903a1ac6d01c08f92219d625162271d9547550" args="" -->LIBUSB_CLASS_PER_INTERFACE</em>&nbsp;</td><td>
<p>In the context of a <a class="el" href="structlibusb__device__descriptor.html">device descriptor</a>, this bDeviceClass value indicates that each interface specifies its own class information and all interfaces operate independently. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggac529888effbefef8af4f9d17ebc903a1a1f87be5c5c32c30e1e6831abdb61461a"></a><!-- doxytag: member="LIBUSB_CLASS_AUDIO" ref="ggac529888effbefef8af4f9d17ebc903a1a1f87be5c5c32c30e1e6831abdb61461a" args="" -->LIBUSB_CLASS_AUDIO</em>&nbsp;</td><td>
<p>Audio class. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggac529888effbefef8af4f9d17ebc903a1a7db61f0ea65d1919962ac0370513183b"></a><!-- doxytag: member="LIBUSB_CLASS_COMM" ref="ggac529888effbefef8af4f9d17ebc903a1a7db61f0ea65d1919962ac0370513183b" args="" -->LIBUSB_CLASS_COMM</em>&nbsp;</td><td>
<p>Communications class. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggac529888effbefef8af4f9d17ebc903a1ad126069ffbc9cb3cda97fe0fe8c190f3"></a><!-- doxytag: member="LIBUSB_CLASS_HID" ref="ggac529888effbefef8af4f9d17ebc903a1ad126069ffbc9cb3cda97fe0fe8c190f3" args="" -->LIBUSB_CLASS_HID</em>&nbsp;</td><td>
<p>Human Interface Device class. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggac529888effbefef8af4f9d17ebc903a1ab1592f5d41d4ee3ccfe0adef8cbf04ee"></a><!-- doxytag: member="LIBUSB_CLASS_PRINTER" ref="ggac529888effbefef8af4f9d17ebc903a1ab1592f5d41d4ee3ccfe0adef8cbf04ee" args="" -->LIBUSB_CLASS_PRINTER</em>&nbsp;</td><td>
<p>Printer dclass. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggac529888effbefef8af4f9d17ebc903a1abcd1d4f42671058f70ab9ae41c5ce303"></a><!-- doxytag: member="LIBUSB_CLASS_PTP" ref="ggac529888effbefef8af4f9d17ebc903a1abcd1d4f42671058f70ab9ae41c5ce303" args="" -->LIBUSB_CLASS_PTP</em>&nbsp;</td><td>
<p>Picture transfer protocol class. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggac529888effbefef8af4f9d17ebc903a1ac84d2301375aef28bf5c3f4bda35f9d1"></a><!-- doxytag: member="LIBUSB_CLASS_MASS_STORAGE" ref="ggac529888effbefef8af4f9d17ebc903a1ac84d2301375aef28bf5c3f4bda35f9d1" args="" -->LIBUSB_CLASS_MASS_STORAGE</em>&nbsp;</td><td>
<p>Mass storage class. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggac529888effbefef8af4f9d17ebc903a1a28ba55c39b90ba3f281542e4ffdb626d"></a><!-- doxytag: member="LIBUSB_CLASS_HUB" ref="ggac529888effbefef8af4f9d17ebc903a1a28ba55c39b90ba3f281542e4ffdb626d" args="" -->LIBUSB_CLASS_HUB</em>&nbsp;</td><td>
<p>Hub class. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggac529888effbefef8af4f9d17ebc903a1aa18621124b0db0f8972556647ad16827"></a><!-- doxytag: member="LIBUSB_CLASS_DATA" ref="ggac529888effbefef8af4f9d17ebc903a1aa18621124b0db0f8972556647ad16827" args="" -->LIBUSB_CLASS_DATA</em>&nbsp;</td><td>
<p>Data class. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggac529888effbefef8af4f9d17ebc903a1aaeea39cf3f500f56381cd6e05132d934"></a><!-- doxytag: member="LIBUSB_CLASS_WIRELESS" ref="ggac529888effbefef8af4f9d17ebc903a1aaeea39cf3f500f56381cd6e05132d934" args="" -->LIBUSB_CLASS_WIRELESS</em>&nbsp;</td><td>
<p>Wireless class. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggac529888effbefef8af4f9d17ebc903a1a3a95beae54453469c4862efc1606dcc9"></a><!-- doxytag: member="LIBUSB_CLASS_APPLICATION" ref="ggac529888effbefef8af4f9d17ebc903a1a3a95beae54453469c4862efc1606dcc9" args="" -->LIBUSB_CLASS_APPLICATION</em>&nbsp;</td><td>
<p>Application class. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggac529888effbefef8af4f9d17ebc903a1ad68e1d33a332360428f838c6ddd847f6"></a><!-- doxytag: member="LIBUSB_CLASS_VENDOR_SPEC" ref="ggac529888effbefef8af4f9d17ebc903a1ad68e1d33a332360428f838c6ddd847f6" args="" -->LIBUSB_CLASS_VENDOR_SPEC</em>&nbsp;</td><td>
<p>Class is vendor-specific. </p>
</td></tr>
</table>
</dd>
</dl>

</div>
</div>
<a class="anchor" id="ga0a2e8a25dfdebf29fdd4764dcdbc1a9c"></a><!-- doxytag: member="libusb.h::libusb_descriptor_type" ref="ga0a2e8a25dfdebf29fdd4764dcdbc1a9c" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__desc.html#ga0a2e8a25dfdebf29fdd4764dcdbc1a9c">libusb_descriptor_type</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Descriptor types as defined by the USB specification. </p>
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="gga0a2e8a25dfdebf29fdd4764dcdbc1a9ca486e222e9f3053502ce4954a5bd89ba2"></a><!-- doxytag: member="LIBUSB_DT_DEVICE" ref="gga0a2e8a25dfdebf29fdd4764dcdbc1a9ca486e222e9f3053502ce4954a5bd89ba2" args="" -->LIBUSB_DT_DEVICE</em>&nbsp;</td><td>
<p>Device descriptor. </p>
<p>See <a class="el" href="structlibusb__device__descriptor.html" title="A structure representing the standard USB device descriptor.">libusb_device_descriptor</a>. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="gga0a2e8a25dfdebf29fdd4764dcdbc1a9ca2a3f906d7755932ab67f39701da0b508"></a><!-- doxytag: member="LIBUSB_DT_CONFIG" ref="gga0a2e8a25dfdebf29fdd4764dcdbc1a9ca2a3f906d7755932ab67f39701da0b508" args="" -->LIBUSB_DT_CONFIG</em>&nbsp;</td><td>
<p>Configuration descriptor. </p>
<p>See <a class="el" href="structlibusb__config__descriptor.html" title="A structure representing the standard USB configuration descriptor.">libusb_config_descriptor</a>. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="gga0a2e8a25dfdebf29fdd4764dcdbc1a9ca2b8ca4332dce1357767ecab20ed2f4c2"></a><!-- doxytag: member="LIBUSB_DT_STRING" ref="gga0a2e8a25dfdebf29fdd4764dcdbc1a9ca2b8ca4332dce1357767ecab20ed2f4c2" args="" -->LIBUSB_DT_STRING</em>&nbsp;</td><td>
<p>String descriptor. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="gga0a2e8a25dfdebf29fdd4764dcdbc1a9ca797f18e35ee27434562aed0c20c46b78"></a><!-- doxytag: member="LIBUSB_DT_INTERFACE" ref="gga0a2e8a25dfdebf29fdd4764dcdbc1a9ca797f18e35ee27434562aed0c20c46b78" args="" -->LIBUSB_DT_INTERFACE</em>&nbsp;</td><td>
<p>Interface descriptor. </p>
<p>See <a class="el" href="structlibusb__interface__descriptor.html" title="A structure representing the standard USB interface descriptor.">libusb_interface_descriptor</a>. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="gga0a2e8a25dfdebf29fdd4764dcdbc1a9ca97df43465eec9e6db81346f521777815"></a><!-- doxytag: member="LIBUSB_DT_ENDPOINT" ref="gga0a2e8a25dfdebf29fdd4764dcdbc1a9ca97df43465eec9e6db81346f521777815" args="" -->LIBUSB_DT_ENDPOINT</em>&nbsp;</td><td>
<p>Endpoint descriptor. </p>
<p>See <a class="el" href="structlibusb__endpoint__descriptor.html" title="A structure representing the standard USB endpoint descriptor.">libusb_endpoint_descriptor</a>. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="gga0a2e8a25dfdebf29fdd4764dcdbc1a9ca3085fb63563770bfa1ede7b27cbf4f5e"></a><!-- doxytag: member="LIBUSB_DT_HID" ref="gga0a2e8a25dfdebf29fdd4764dcdbc1a9ca3085fb63563770bfa1ede7b27cbf4f5e" args="" -->LIBUSB_DT_HID</em>&nbsp;</td><td>
<p>HID descriptor. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="gga0a2e8a25dfdebf29fdd4764dcdbc1a9ca3972f13fb6b6abdb0978dc43d9d24e6f"></a><!-- doxytag: member="LIBUSB_DT_REPORT" ref="gga0a2e8a25dfdebf29fdd4764dcdbc1a9ca3972f13fb6b6abdb0978dc43d9d24e6f" args="" -->LIBUSB_DT_REPORT</em>&nbsp;</td><td>
<p>HID report descriptor. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="gga0a2e8a25dfdebf29fdd4764dcdbc1a9ca77c22f3dc80f2a505c22c68cc54c70d3"></a><!-- doxytag: member="LIBUSB_DT_PHYSICAL" ref="gga0a2e8a25dfdebf29fdd4764dcdbc1a9ca77c22f3dc80f2a505c22c68cc54c70d3" args="" -->LIBUSB_DT_PHYSICAL</em>&nbsp;</td><td>
<p>Physical descriptor. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="gga0a2e8a25dfdebf29fdd4764dcdbc1a9ca2186edbc7dc05b063ac41103a5ccfa9a"></a><!-- doxytag: member="LIBUSB_DT_HUB" ref="gga0a2e8a25dfdebf29fdd4764dcdbc1a9ca2186edbc7dc05b063ac41103a5ccfa9a" args="" -->LIBUSB_DT_HUB</em>&nbsp;</td><td>
<p>Hub descriptor. </p>
</td></tr>
</table>
</dd>
</dl>

</div>
</div>
<a class="anchor" id="ga86c880af878493aa8f805c2aba654b8b"></a><!-- doxytag: member="libusb.h::libusb_endpoint_direction" ref="ga86c880af878493aa8f805c2aba654b8b" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__desc.html#ga86c880af878493aa8f805c2aba654b8b">libusb_endpoint_direction</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Endpoint direction. </p>
<p>Values for bit 7 of the <a class="el" href="structlibusb__endpoint__descriptor.html#a111d087a09cbeded8e15eda9127e23d2">endpoint address</a> scheme. </p>
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="gga86c880af878493aa8f805c2aba654b8ba3829979c66e5344367f32f4a31d43613"></a><!-- doxytag: member="LIBUSB_ENDPOINT_IN" ref="gga86c880af878493aa8f805c2aba654b8ba3829979c66e5344367f32f4a31d43613" args="" -->LIBUSB_ENDPOINT_IN</em>&nbsp;</td><td>
<p>In: device-to-host. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="gga86c880af878493aa8f805c2aba654b8ba940484c16d44bdfc6eccc2de7a9ffcb2"></a><!-- doxytag: member="LIBUSB_ENDPOINT_OUT" ref="gga86c880af878493aa8f805c2aba654b8ba940484c16d44bdfc6eccc2de7a9ffcb2" args="" -->LIBUSB_ENDPOINT_OUT</em>&nbsp;</td><td>
<p>Out: host-to-device. </p>
</td></tr>
</table>
</dd>
</dl>

</div>
</div>
<a class="anchor" id="gacb52027036a07de6ecc6c2bf07d07c71"></a><!-- doxytag: member="libusb.h::libusb_transfer_type" ref="gacb52027036a07de6ecc6c2bf07d07c71" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__desc.html#gacb52027036a07de6ecc6c2bf07d07c71">libusb_transfer_type</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Endpoint transfer type. </p>
<p>Values for bits 0:1 of the <a class="el" href="structlibusb__endpoint__descriptor.html#a932b84417c46467f9916ecf7b679160b">endpoint attributes</a> field. </p>
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="ggacb52027036a07de6ecc6c2bf07d07c71a4c89624658c783ef9b2a2f08091bc7d7"></a><!-- doxytag: member="LIBUSB_TRANSFER_TYPE_CONTROL" ref="ggacb52027036a07de6ecc6c2bf07d07c71a4c89624658c783ef9b2a2f08091bc7d7" args="" -->LIBUSB_TRANSFER_TYPE_CONTROL</em>&nbsp;</td><td>
<p>Control endpoint. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggacb52027036a07de6ecc6c2bf07d07c71a40de9889554fc1785d784b3c31333300"></a><!-- doxytag: member="LIBUSB_TRANSFER_TYPE_ISOCHRONOUS" ref="ggacb52027036a07de6ecc6c2bf07d07c71a40de9889554fc1785d784b3c31333300" args="" -->LIBUSB_TRANSFER_TYPE_ISOCHRONOUS</em>&nbsp;</td><td>
<p>Isochronous endpoint. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggacb52027036a07de6ecc6c2bf07d07c71a7bdfa2fc5dadbaaa0e9262e1b4a228e2"></a><!-- doxytag: member="LIBUSB_TRANSFER_TYPE_BULK" ref="ggacb52027036a07de6ecc6c2bf07d07c71a7bdfa2fc5dadbaaa0e9262e1b4a228e2" args="" -->LIBUSB_TRANSFER_TYPE_BULK</em>&nbsp;</td><td>
<p>Bulk endpoint. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggacb52027036a07de6ecc6c2bf07d07c71aefb0e07862c0eed894ec9c2f957a7e3c"></a><!-- doxytag: member="LIBUSB_TRANSFER_TYPE_INTERRUPT" ref="ggacb52027036a07de6ecc6c2bf07d07c71aefb0e07862c0eed894ec9c2f957a7e3c" args="" -->LIBUSB_TRANSFER_TYPE_INTERRUPT</em>&nbsp;</td><td>
<p>Interrupt endpoint. </p>
</td></tr>
</table>
</dd>
</dl>

</div>
</div>
<a class="anchor" id="gaa2231202dfe12eddca49b1193d44a441"></a><!-- doxytag: member="libusb.h::libusb_iso_sync_type" ref="gaa2231202dfe12eddca49b1193d44a441" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__desc.html#gaa2231202dfe12eddca49b1193d44a441">libusb_iso_sync_type</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Synchronization type for isochronous endpoints. </p>
<p>Values for bits 2:3 of the <a class="el" href="structlibusb__endpoint__descriptor.html#a932b84417c46467f9916ecf7b679160b">bmAttributes</a> field in <a class="el" href="structlibusb__endpoint__descriptor.html" title="A structure representing the standard USB endpoint descriptor.">libusb_endpoint_descriptor</a>. </p>
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="ggaa2231202dfe12eddca49b1193d44a441a4a74eefd565a40b4ed911baaaaea1cee"></a><!-- doxytag: member="LIBUSB_ISO_SYNC_TYPE_NONE" ref="ggaa2231202dfe12eddca49b1193d44a441a4a74eefd565a40b4ed911baaaaea1cee" args="" -->LIBUSB_ISO_SYNC_TYPE_NONE</em>&nbsp;</td><td>
<p>No synchronization. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggaa2231202dfe12eddca49b1193d44a441ab97a868cd66bfcac50f9ccf8ff0b3a67"></a><!-- doxytag: member="LIBUSB_ISO_SYNC_TYPE_ASYNC" ref="ggaa2231202dfe12eddca49b1193d44a441ab97a868cd66bfcac50f9ccf8ff0b3a67" args="" -->LIBUSB_ISO_SYNC_TYPE_ASYNC</em>&nbsp;</td><td>
<p>Asynchronous. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggaa2231202dfe12eddca49b1193d44a441a813f487563e5b61a8399e7512f0c303b"></a><!-- doxytag: member="LIBUSB_ISO_SYNC_TYPE_ADAPTIVE" ref="ggaa2231202dfe12eddca49b1193d44a441a813f487563e5b61a8399e7512f0c303b" args="" -->LIBUSB_ISO_SYNC_TYPE_ADAPTIVE</em>&nbsp;</td><td>
<p>Adaptive. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggaa2231202dfe12eddca49b1193d44a441a39244a977707c95c7f3ba0e978faba84"></a><!-- doxytag: member="LIBUSB_ISO_SYNC_TYPE_SYNC" ref="ggaa2231202dfe12eddca49b1193d44a441a39244a977707c95c7f3ba0e978faba84" args="" -->LIBUSB_ISO_SYNC_TYPE_SYNC</em>&nbsp;</td><td>
<p>Synchronous. </p>
</td></tr>
</table>
</dd>
</dl>

</div>
</div>
<a class="anchor" id="gab72474551b0eb965401e6febb856007c"></a><!-- doxytag: member="libusb.h::libusb_iso_usage_type" ref="gab72474551b0eb965401e6febb856007c" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__desc.html#gab72474551b0eb965401e6febb856007c">libusb_iso_usage_type</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Usage type for isochronous endpoints. </p>
<p>Values for bits 4:5 of the <a class="el" href="structlibusb__endpoint__descriptor.html#a932b84417c46467f9916ecf7b679160b">bmAttributes</a> field in <a class="el" href="structlibusb__endpoint__descriptor.html" title="A structure representing the standard USB endpoint descriptor.">libusb_endpoint_descriptor</a>. </p>
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="ggab72474551b0eb965401e6febb856007ca13edfd0d36d959bcf32d5cca341c7f38"></a><!-- doxytag: member="LIBUSB_ISO_USAGE_TYPE_DATA" ref="ggab72474551b0eb965401e6febb856007ca13edfd0d36d959bcf32d5cca341c7f38" args="" -->LIBUSB_ISO_USAGE_TYPE_DATA</em>&nbsp;</td><td>
<p>Data endpoint. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggab72474551b0eb965401e6febb856007ca2390aa76c4444e0b590fb65f305e4485"></a><!-- doxytag: member="LIBUSB_ISO_USAGE_TYPE_FEEDBACK" ref="ggab72474551b0eb965401e6febb856007ca2390aa76c4444e0b590fb65f305e4485" args="" -->LIBUSB_ISO_USAGE_TYPE_FEEDBACK</em>&nbsp;</td><td>
<p>Feedback endpoint. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="ggab72474551b0eb965401e6febb856007ca8e48a0bad38cfaf0e87dfdc225f91e32"></a><!-- doxytag: member="LIBUSB_ISO_USAGE_TYPE_IMPLICIT" ref="ggab72474551b0eb965401e6febb856007ca8e48a0bad38cfaf0e87dfdc225f91e32" args="" -->LIBUSB_ISO_USAGE_TYPE_IMPLICIT</em>&nbsp;</td><td>
<p>Implicit feedback Data endpoint. </p>
</td></tr>
</table>
</dd>
</dl>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="ga5e9ab08d490a7704cf3a9b0439f16f00"></a><!-- doxytag: member="descriptor.c::libusb_get_device_descriptor" ref="ga5e9ab08d490a7704cf3a9b0439f16f00" args="(libusb_device *dev, struct libusb_device_descriptor *desc)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int libusb_get_device_descriptor </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__dev.html#ga77eedd00d01eb7569b880e861a971c2b">libusb_device</a> *&nbsp;</td>
          <td class="paramname"> <em>dev</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structlibusb__device__descriptor.html">libusb_device_descriptor</a> *&nbsp;</td>
          <td class="paramname"> <em>desc</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the USB device descriptor for a given device. </p>
<p>This is a non-blocking function; the device descriptor is cached in memory.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>dev</em>&nbsp;</td><td>the device </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>desc</em>&nbsp;</td><td>output location for the descriptor data </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>0 on success or a LIBUSB_ERROR code on failure </dd></dl>

</div>
</div>
<a class="anchor" id="ga425885149172b53b3975a07629c8dab3"></a><!-- doxytag: member="descriptor.c::libusb_get_active_config_descriptor" ref="ga425885149172b53b3975a07629c8dab3" args="(libusb_device *dev, struct libusb_config_descriptor **config)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int libusb_get_active_config_descriptor </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__dev.html#ga77eedd00d01eb7569b880e861a971c2b">libusb_device</a> *&nbsp;</td>
          <td class="paramname"> <em>dev</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structlibusb__config__descriptor.html">libusb_config_descriptor</a> **&nbsp;</td>
          <td class="paramname"> <em>config</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get the USB configuration descriptor for the currently active configuration. </p>
<p>This is a non-blocking function which does not involve any requests being sent to the device.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>dev</em>&nbsp;</td><td>a device </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>config</em>&nbsp;</td><td>output location for the USB configuration descriptor. Only valid if 0 was returned. Must be freed with <a class="el" href="group__desc.html#ga18d2b08a065857ff7ae4f3f719c115cc" title="Free a configuration descriptor obtained from libusb_get_active_config_descriptor()...">libusb_free_config_descriptor()</a> after use. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>0 on success </dd>
<dd>
LIBUSB_ERROR_NOT_FOUND if the device is in unconfigured state </dd>
<dd>
another LIBUSB_ERROR code on error </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__desc.html#gaa635d9aec77de4895dd0896ccf001532" title="Get a USB configuration descriptor based on its index.">libusb_get_config_descriptor</a> </dd></dl>

</div>
</div>
<a class="anchor" id="gaa635d9aec77de4895dd0896ccf001532"></a><!-- doxytag: member="descriptor.c::libusb_get_config_descriptor" ref="gaa635d9aec77de4895dd0896ccf001532" args="(libusb_device *dev, uint8_t config_index, struct libusb_config_descriptor **config)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int libusb_get_config_descriptor </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__dev.html#ga77eedd00d01eb7569b880e861a971c2b">libusb_device</a> *&nbsp;</td>
          <td class="paramname"> <em>dev</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&nbsp;</td>
          <td class="paramname"> <em>config_index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structlibusb__config__descriptor.html">libusb_config_descriptor</a> **&nbsp;</td>
          <td class="paramname"> <em>config</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get a USB configuration descriptor based on its index. </p>
<p>This is a non-blocking function which does not involve any requests being sent to the device.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>dev</em>&nbsp;</td><td>a device </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>config_index</em>&nbsp;</td><td>the index of the configuration you wish to retrieve </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>config</em>&nbsp;</td><td>output location for the USB configuration descriptor. Only valid if 0 was returned. Must be freed with <a class="el" href="group__desc.html#ga18d2b08a065857ff7ae4f3f719c115cc" title="Free a configuration descriptor obtained from libusb_get_active_config_descriptor()...">libusb_free_config_descriptor()</a> after use. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>0 on success </dd>
<dd>
LIBUSB_ERROR_NOT_FOUND if the configuration does not exist </dd>
<dd>
another LIBUSB_ERROR code on error </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__desc.html#ga425885149172b53b3975a07629c8dab3" title="Get the USB configuration descriptor for the currently active configuration.">libusb_get_active_config_descriptor()</a> </dd>
<dd>
<a class="el" href="group__desc.html#ga3e7bffc5d08404c4d6491e73b967bf67" title="Get a USB configuration descriptor with a specific bConfigurationValue.">libusb_get_config_descriptor_by_value()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga3e7bffc5d08404c4d6491e73b967bf67"></a><!-- doxytag: member="descriptor.c::libusb_get_config_descriptor_by_value" ref="ga3e7bffc5d08404c4d6491e73b967bf67" args="(libusb_device *dev, uint8_t bConfigurationValue, struct libusb_config_descriptor **config)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int libusb_get_config_descriptor_by_value </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__dev.html#ga77eedd00d01eb7569b880e861a971c2b">libusb_device</a> *&nbsp;</td>
          <td class="paramname"> <em>dev</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&nbsp;</td>
          <td class="paramname"> <em>bConfigurationValue</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct <a class="el" href="structlibusb__config__descriptor.html">libusb_config_descriptor</a> **&nbsp;</td>
          <td class="paramname"> <em>config</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get a USB configuration descriptor with a specific bConfigurationValue. </p>
<p>This is a non-blocking function which does not involve any requests being sent to the device.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>dev</em>&nbsp;</td><td>a device </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>bConfigurationValue</em>&nbsp;</td><td>the bConfigurationValue of the configuration you wish to retrieve </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>config</em>&nbsp;</td><td>output location for the USB configuration descriptor. Only valid if 0 was returned. Must be freed with <a class="el" href="group__desc.html#ga18d2b08a065857ff7ae4f3f719c115cc" title="Free a configuration descriptor obtained from libusb_get_active_config_descriptor()...">libusb_free_config_descriptor()</a> after use. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>0 on success </dd>
<dd>
LIBUSB_ERROR_NOT_FOUND if the configuration does not exist </dd>
<dd>
another LIBUSB_ERROR code on error </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__desc.html#ga425885149172b53b3975a07629c8dab3" title="Get the USB configuration descriptor for the currently active configuration.">libusb_get_active_config_descriptor()</a> </dd>
<dd>
<a class="el" href="group__desc.html#gaa635d9aec77de4895dd0896ccf001532" title="Get a USB configuration descriptor based on its index.">libusb_get_config_descriptor()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ga18d2b08a065857ff7ae4f3f719c115cc"></a><!-- doxytag: member="descriptor.c::libusb_free_config_descriptor" ref="ga18d2b08a065857ff7ae4f3f719c115cc" args="(struct libusb_config_descriptor *config)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void libusb_free_config_descriptor </td>
          <td>(</td>
          <td class="paramtype">struct <a class="el" href="structlibusb__config__descriptor.html">libusb_config_descriptor</a> *&nbsp;</td>
          <td class="paramname"> <em>config</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Free a configuration descriptor obtained from <a class="el" href="group__desc.html#ga425885149172b53b3975a07629c8dab3" title="Get the USB configuration descriptor for the currently active configuration.">libusb_get_active_config_descriptor()</a> or <a class="el" href="group__desc.html#gaa635d9aec77de4895dd0896ccf001532" title="Get a USB configuration descriptor based on its index.">libusb_get_config_descriptor()</a>. </p>
<p>It is safe to call this function with a NULL config parameter, in which case the function simply returns.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>config</em>&nbsp;</td><td>the configuration descriptor to free </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="gaf3f92d0a7465d49a5e61eb3f8689fae4"></a><!-- doxytag: member="descriptor.c::libusb_get_string_descriptor_ascii" ref="gaf3f92d0a7465d49a5e61eb3f8689fae4" args="(libusb_device_handle *dev, uint8_t desc_index, unsigned char *data, int length)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int libusb_get_string_descriptor_ascii </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__dev.html#ga7df95821d20d27b5597f1d783749d6a4">libusb_device_handle</a> *&nbsp;</td>
          <td class="paramname"> <em>dev</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&nbsp;</td>
          <td class="paramname"> <em>desc_index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char *&nbsp;</td>
          <td class="paramname"> <em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>length</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Retrieve a string descriptor in C style ASCII. </p>
<p>Wrapper around <a class="el" href="group__desc.html#gab89c2119087308c6bfa6a4be30f39bc3" title="Retrieve a descriptor from a device.">libusb_get_string_descriptor()</a>. Uses the first language supported by the device.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>dev</em>&nbsp;</td><td>a device handle </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>desc_index</em>&nbsp;</td><td>the index of the descriptor to retrieve </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>data</em>&nbsp;</td><td>output buffer for ASCII string descriptor </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>length</em>&nbsp;</td><td>size of data buffer </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>number of bytes returned in data, or LIBUSB_ERROR code on failure </dd></dl>

</div>
</div>
<a class="anchor" id="ga465642422af4ba2a988e188c6c86d7f0"></a><!-- doxytag: member="libusb.h::libusb_get_descriptor" ref="ga465642422af4ba2a988e188c6c86d7f0" args="(libusb_device_handle *dev, uint8_t desc_type, uint8_t desc_index, unsigned char *data, int length)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static int libusb_get_descriptor </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__dev.html#ga7df95821d20d27b5597f1d783749d6a4">libusb_device_handle</a> *&nbsp;</td>
          <td class="paramname"> <em>dev</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&nbsp;</td>
          <td class="paramname"> <em>desc_type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&nbsp;</td>
          <td class="paramname"> <em>desc_index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char *&nbsp;</td>
          <td class="paramname"> <em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>length</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Retrieve a descriptor from the default control pipe. </p>
<p>This is a convenience function which formulates the appropriate control message to retrieve the descriptor.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>dev</em>&nbsp;</td><td>a device handle </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>desc_type</em>&nbsp;</td><td>the descriptor type, see <a class="el" href="group__desc.html#ga0a2e8a25dfdebf29fdd4764dcdbc1a9c">libusb_descriptor_type</a> </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>desc_index</em>&nbsp;</td><td>the index of the descriptor to retrieve </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>data</em>&nbsp;</td><td>output buffer for descriptor </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>length</em>&nbsp;</td><td>size of data buffer </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>number of bytes returned in data, or LIBUSB_ERROR code on failure </dd></dl>

</div>
</div>
<a class="anchor" id="gab89c2119087308c6bfa6a4be30f39bc3"></a><!-- doxytag: member="libusb.h::libusb_get_string_descriptor" ref="gab89c2119087308c6bfa6a4be30f39bc3" args="(libusb_device_handle *dev, uint8_t desc_index, uint16_t langid, unsigned char *data, int length)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static int libusb_get_string_descriptor </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__dev.html#ga7df95821d20d27b5597f1d783749d6a4">libusb_device_handle</a> *&nbsp;</td>
          <td class="paramname"> <em>dev</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&nbsp;</td>
          <td class="paramname"> <em>desc_index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&nbsp;</td>
          <td class="paramname"> <em>langid</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned char *&nbsp;</td>
          <td class="paramname"> <em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>length</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td><code> [inline, static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Retrieve a descriptor from a device. </p>
<p>This is a convenience function which formulates the appropriate control message to retrieve the descriptor. The string returned is Unicode, as detailed in the USB specifications.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>dev</em>&nbsp;</td><td>a device handle </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>desc_index</em>&nbsp;</td><td>the index of the descriptor to retrieve </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>langid</em>&nbsp;</td><td>the language ID for the string descriptor </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>data</em>&nbsp;</td><td>output buffer for descriptor </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>length</em>&nbsp;</td><td>size of data buffer </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>number of bytes returned in data, or LIBUSB_ERROR code on failure </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__desc.html#gaf3f92d0a7465d49a5e61eb3f8689fae4" title="Retrieve a string descriptor in C style ASCII.">libusb_get_string_descriptor_ascii()</a> </dd></dl>

</div>
</div>
</div>
<hr class="footer"/><address style="text-align: right;"><small>Generated on Wed Apr 28 09:03:58 2010 for libusb by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>