<!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: libusb_config_descriptor Struct Reference</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.2 --> <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 Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li class="current"><a href="annotated.html"><span>Data Structures</span></a></li> <li><a href="files.html"><span>Files</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="annotated.html"><span>Data Structures</span></a></li> <li><a href="classes.html"><span>Data Structure Index</span></a></li> <li><a href="functions.html"><span>Data Fields</span></a></li> </ul> </div> </div> <div class="contents"> <h1>libusb_config_descriptor Struct Reference<br/> <small> [<a class="el" href="group__desc.html">USB descriptors</a>]</small> </h1><!-- doxytag: class="libusb_config_descriptor" --> <p>A structure representing the standard USB configuration descriptor. <a href="#_details">More...</a></p> <p><code>#include <<a class="el" href="libusb_8h_source.html">libusb.h</a>></code></p> <table border="0" cellpadding="0" cellspacing="0"> <tr><td colspan="2"><h2>Data Fields</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a18ccd46a86328fd9c849e17ca8f01738"></a><!-- doxytag: member="libusb_config_descriptor::bLength" ref="a18ccd46a86328fd9c849e17ca8f01738" args="" --> uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="structlibusb__config__descriptor.html#a18ccd46a86328fd9c849e17ca8f01738">bLength</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Size of this descriptor (in bytes). <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="structlibusb__config__descriptor.html#abc4f9a751c5b2ed968b045cb17528f74">bDescriptorType</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Descriptor type. <a href="#abc4f9a751c5b2ed968b045cb17528f74"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a819c160c66c1bd7b569399e6a6fc278f"></a><!-- doxytag: member="libusb_config_descriptor::wTotalLength" ref="a819c160c66c1bd7b569399e6a6fc278f" args="" --> uint16_t </td><td class="memItemRight" valign="bottom"><a class="el" href="structlibusb__config__descriptor.html#a819c160c66c1bd7b569399e6a6fc278f">wTotalLength</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Total length of data returned for this configuration. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2c89b2d0a9ec0440801b97a8f8145792"></a><!-- doxytag: member="libusb_config_descriptor::bNumInterfaces" ref="a2c89b2d0a9ec0440801b97a8f8145792" args="" --> uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="structlibusb__config__descriptor.html#a2c89b2d0a9ec0440801b97a8f8145792">bNumInterfaces</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Number of interfaces supported by this configuration. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a04549d99d38080857e0256fcad8dcce7"></a><!-- doxytag: member="libusb_config_descriptor::bConfigurationValue" ref="a04549d99d38080857e0256fcad8dcce7" args="" --> uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="structlibusb__config__descriptor.html#a04549d99d38080857e0256fcad8dcce7">bConfigurationValue</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Identifier value for this configuration. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a06dbb2e068b3999dd23954e63640d953"></a><!-- doxytag: member="libusb_config_descriptor::iConfiguration" ref="a06dbb2e068b3999dd23954e63640d953" args="" --> uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="structlibusb__config__descriptor.html#a06dbb2e068b3999dd23954e63640d953">iConfiguration</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Index of string descriptor describing this configuration. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adb65fe86ce28394110caad982c566525"></a><!-- doxytag: member="libusb_config_descriptor::bmAttributes" ref="adb65fe86ce28394110caad982c566525" args="" --> uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="structlibusb__config__descriptor.html#adb65fe86ce28394110caad982c566525">bmAttributes</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Configuration characteristics. <br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">uint8_t </td><td class="memItemRight" valign="bottom"><a class="el" href="structlibusb__config__descriptor.html#a527518147a0c7321a195f2d8dac2ea01">MaxPower</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Maximum power consumption of the USB device from this bus in this configuration when the device is fully opreation. <a href="#a527518147a0c7321a195f2d8dac2ea01"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="structlibusb__interface.html">libusb_interface</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="structlibusb__config__descriptor.html#a96346b812ba6a192f6d393b28ab16766">interface</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Array of interfaces supported by this configuration. <a href="#a96346b812ba6a192f6d393b28ab16766"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">const unsigned char * </td><td class="memItemRight" valign="bottom"><a class="el" href="structlibusb__config__descriptor.html#acc982e6c82f7183dfa41076d28d991f7">extra</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Extra descriptors. <a href="#acc982e6c82f7183dfa41076d28d991f7"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="structlibusb__config__descriptor.html#a18439e83e8f46606a13d70c00a48a9d9">extra_length</a></td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Length of the extra descriptors, in bytes. <a href="#a18439e83e8f46606a13d70c00a48a9d9"></a><br/></td></tr> </table> <hr/><a name="_details"></a><h2>Detailed Description</h2> <p>A structure representing the standard USB configuration descriptor. </p> <p>This descriptor is documented in section 9.6.3 of the USB 2.0 specification. All multiple-byte fields are represented in host-endian format. </p> <hr/><h2>Field Documentation</h2> <a class="anchor" id="abc4f9a751c5b2ed968b045cb17528f74"></a><!-- doxytag: member="libusb_config_descriptor::bDescriptorType" ref="abc4f9a751c5b2ed968b045cb17528f74" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">uint8_t <a class="el" href="structlibusb__config__descriptor.html#abc4f9a751c5b2ed968b045cb17528f74">libusb_config_descriptor::bDescriptorType</a></td> </tr> </table> </div> <div class="memdoc"> <p>Descriptor type. </p> <p>Will have value <a class="el" href="group__desc.html#gga0a2e8a25dfdebf29fdd4764dcdbc1a9ca2a3f906d7755932ab67f39701da0b508">libusb_descriptor_type::LIBUSB_DT_CONFIG</a> LIBUSB_DT_CONFIG in this context. </p> </div> </div> <a class="anchor" id="a527518147a0c7321a195f2d8dac2ea01"></a><!-- doxytag: member="libusb_config_descriptor::MaxPower" ref="a527518147a0c7321a195f2d8dac2ea01" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">uint8_t <a class="el" href="structlibusb__config__descriptor.html#a527518147a0c7321a195f2d8dac2ea01">libusb_config_descriptor::MaxPower</a></td> </tr> </table> </div> <div class="memdoc"> <p>Maximum power consumption of the USB device from this bus in this configuration when the device is fully opreation. </p> <p>Expressed in units of 2 mA. </p> </div> </div> <a class="anchor" id="a96346b812ba6a192f6d393b28ab16766"></a><!-- doxytag: member="libusb_config_descriptor::interface" ref="a96346b812ba6a192f6d393b28ab16766" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">struct <a class="el" href="structlibusb__interface.html">libusb_interface</a>* <a class="el" href="structlibusb__config__descriptor.html#a96346b812ba6a192f6d393b28ab16766">libusb_config_descriptor::interface</a></td> </tr> </table> </div> <div class="memdoc"> <p>Array of interfaces supported by this configuration. </p> <p>The length of this array is determined by the bNumInterfaces field. </p> </div> </div> <a class="anchor" id="acc982e6c82f7183dfa41076d28d991f7"></a><!-- doxytag: member="libusb_config_descriptor::extra" ref="acc982e6c82f7183dfa41076d28d991f7" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">const unsigned char* <a class="el" href="structlibusb__config__descriptor.html#acc982e6c82f7183dfa41076d28d991f7">libusb_config_descriptor::extra</a></td> </tr> </table> </div> <div class="memdoc"> <p>Extra descriptors. </p> <p>If libusb encounters unknown configuration descriptors, it will store them here, should you wish to parse them. </p> </div> </div> <a class="anchor" id="a18439e83e8f46606a13d70c00a48a9d9"></a><!-- doxytag: member="libusb_config_descriptor::extra_length" ref="a18439e83e8f46606a13d70c00a48a9d9" args="" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int <a class="el" href="structlibusb__config__descriptor.html#a18439e83e8f46606a13d70c00a48a9d9">libusb_config_descriptor::extra_length</a></td> </tr> </table> </div> <div class="memdoc"> <p>Length of the extra descriptors, in bytes. </p> </div> </div> <hr/>The documentation for this struct was generated from the following file:<ul> <li><a class="el" href="libusb_8h_source.html">libusb.h</a></li> </ul> </div> <hr size="1"/><address style="text-align: right;"><small>Generated by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.2 </small></address> </body> </html>