<ahref="usb__ch9_8h.html">Go to the documentation of this file.</a><divclass="fragment"><divclass="line"><aname="l00001"></a><spanclass="lineno"> 1</span> <spanclass="comment">/* Copyright (C) 2011 Circuits At Home, LTD. All rights reserved.</span></div>
<divclass="line"><aname="l00003"></a><spanclass="lineno"> 3</span> <spanclass="comment">This program is free software; you can redistribute it and/or modify</span></div>
<divclass="line"><aname="l00004"></a><spanclass="lineno"> 4</span> <spanclass="comment">it under the terms of the GNU General Public License as published by</span></div>
<divclass="line"><aname="l00005"></a><spanclass="lineno"> 5</span> <spanclass="comment">the Free Software Foundation; either version 2 of the License, or</span></div>
<divclass="line"><aname="l00006"></a><spanclass="lineno"> 6</span> <spanclass="comment">(at your option) any later version.</span></div>
<divclass="line"><aname="l00008"></a><spanclass="lineno"> 8</span> <spanclass="comment">This program is distributed in the hope that it will be useful,</span></div>
<divclass="line"><aname="l00009"></a><spanclass="lineno"> 9</span> <spanclass="comment">but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div>
<divclass="line"><aname="l00010"></a><spanclass="lineno"> 10</span> <spanclass="comment">MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the</span></div>
<divclass="line"><aname="l00011"></a><spanclass="lineno"> 11</span> <spanclass="comment">GNU General Public License for more details.</span></div>
<divclass="line"><aname="l00013"></a><spanclass="lineno"> 13</span> <spanclass="comment">You should have received a copy of the GNU General Public License</span></div>
<divclass="line"><aname="l00014"></a><spanclass="lineno"> 14</span> <spanclass="comment">along with this program; if not, write to the Free Software</span></div>
<divclass="line"><aname="l00015"></a><spanclass="lineno"> 15</span> <spanclass="comment">Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA</span></div>
<divclass="line"><aname="l00026"></a><spanclass="lineno"> 26</span> <spanclass="preprocessor"></span><spanclass="preprocessor">#error "Never include usb_ch9.h directly; include Usb.h instead"</span></div>
<divclass="line"><aname="l00058"></a><spanclass="lineno"><aclass="line"href="usb__ch9_8h.html#a610dad02930a3061c746f84885e1e11e"> 58</a></span> <spanclass="preprocessor">#define USB_SETUP_HOST_TO_DEVICE 0x00 // Device Request bmRequestType transfer direction - host to device transfer</span></div>
<divclass="line"><aname="l00059"></a><spanclass="lineno"><aclass="line"href="usb__ch9_8h.html#a35c2a529dc87a274b2eb6f9e33682449"> 59</a></span> <spanclass="preprocessor"></span><spanclass="preprocessor">#define USB_SETUP_DEVICE_TO_HOST 0x80 // Device Request bmRequestType transfer direction - device to host transfer</span></div>
<divclass="line"><aname="l00070"></a><spanclass="lineno"><aclass="line"href="usb__ch9_8h.html#ac6d0566773ed4549fe1a7a932e6c46de"> 70</a></span> <spanclass="preprocessor">#define USB_DESCRIPTOR_DEVICE 0x01 // bDescriptorType for a Device Descriptor.</span></div>
<divclass="line"><aname="l00071"></a><spanclass="lineno"><aclass="line"href="usb__ch9_8h.html#aa17b365c4eb8bd2f6a4d4e4fb5f881c7"> 71</a></span> <spanclass="preprocessor"></span><spanclass="preprocessor">#define USB_DESCRIPTOR_CONFIGURATION 0x02 // bDescriptorType for a Configuration Descriptor.</span></div>
<divclass="line"><aname="l00072"></a><spanclass="lineno"><aclass="line"href="usb__ch9_8h.html#abbad38caa1ca9c52f47adccd3a850aed"> 72</a></span> <spanclass="preprocessor"></span><spanclass="preprocessor">#define USB_DESCRIPTOR_STRING 0x03 // bDescriptorType for a String Descriptor.</span></div>
<divclass="line"><aname="l00073"></a><spanclass="lineno"><aclass="line"href="usb__ch9_8h.html#a5856eef11136823c671407f77cc5d254"> 73</a></span> <spanclass="preprocessor"></span><spanclass="preprocessor">#define USB_DESCRIPTOR_INTERFACE 0x04 // bDescriptorType for an Interface Descriptor.</span></div>
<divclass="line"><aname="l00074"></a><spanclass="lineno"><aclass="line"href="usb__ch9_8h.html#ac3f574f82929eedc3386195f9a941203"> 74</a></span> <spanclass="preprocessor"></span><spanclass="preprocessor">#define USB_DESCRIPTOR_ENDPOINT 0x05 // bDescriptorType for an Endpoint Descriptor.</span></div>
<divclass="line"><aname="l00075"></a><spanclass="lineno"><aclass="line"href="usb__ch9_8h.html#afd341d3128818c2db68a3523118e0820"> 75</a></span> <spanclass="preprocessor"></span><spanclass="preprocessor">#define USB_DESCRIPTOR_DEVICE_QUALIFIER 0x06 // bDescriptorType for a Device Qualifier.</span></div>
<divclass="line"><aname="l00076"></a><spanclass="lineno"><aclass="line"href="usb__ch9_8h.html#a23e9c1e9645156958e80e9aa2ee77ef7"> 76</a></span> <spanclass="preprocessor"></span><spanclass="preprocessor">#define USB_DESCRIPTOR_OTHER_SPEED 0x07 // bDescriptorType for a Other Speed Configuration.</span></div>
<divclass="line"><aname="l00077"></a><spanclass="lineno"><aclass="line"href="usb__ch9_8h.html#ab02fac418606f02b4681c3302fbbce07"> 77</a></span> <spanclass="preprocessor"></span><spanclass="preprocessor">#define USB_DESCRIPTOR_INTERFACE_POWER 0x08 // bDescriptorType for Interface Power.</span></div>
<divclass="line"><aname="l00078"></a><spanclass="lineno"><aclass="line"href="usb__ch9_8h.html#ac75fbfa446e248951836d6b6bfad44d0"> 78</a></span> <spanclass="preprocessor"></span><spanclass="preprocessor">#define USB_DESCRIPTOR_OTG 0x09 // bDescriptorType for an OTG Descriptor.</span></div>
<divclass="line"><aname="l00084"></a><spanclass="lineno"> 84</span> <spanclass="comment">/* OTG SET FEATURE Constants */</span></div>
<divclass="line"><aname="l00085"></a><spanclass="lineno"><aclass="line"href="usb__ch9_8h.html#ab1eb008c2545555250224ffdd22e6ef7"> 85</a></span> <spanclass="preprocessor">#define OTG_FEATURE_B_HNP_ENABLE 3 // SET FEATURE OTG - Enable B device to perform HNP</span></div>
<divclass="line"><aname="l00086"></a><spanclass="lineno"><aclass="line"href="usb__ch9_8h.html#ac95e8be488ed9ca8ebf9541306fe070b"> 86</a></span> <spanclass="preprocessor"></span><spanclass="preprocessor">#define OTG_FEATURE_A_HNP_SUPPORT 4 // SET FEATURE OTG - A device supports HNP</span></div>
<divclass="line"><aname="l00087"></a><spanclass="lineno"><aclass="line"href="usb__ch9_8h.html#a4c05deae742762f3110366a7bb8bffc2"> 87</a></span> <spanclass="preprocessor"></span><spanclass="preprocessor">#define OTG_FEATURE_A_ALT_HNP_SUPPORT 5 // SET FEATURE OTG - Another port on the A device supports HNP</span></div>
<divclass="line"><aname="l00089"></a><spanclass="lineno"> 89</span> <spanclass="comment">/* USB Endpoint Transfer Types */</span></div>
<divclass="line"><aname="l00090"></a><spanclass="lineno"><aclass="line"href="usb__ch9_8h.html#aca5ae035469fa5e3d238eea0942bba88"> 90</a></span> <spanclass="preprocessor">#define USB_TRANSFER_TYPE_CONTROL 0x00 // Endpoint is a control endpoint.</span></div>
<divclass="line"><aname="l00091"></a><spanclass="lineno"><aclass="line"href="usb__ch9_8h.html#ae0865fa52b39929c055e59559e138392"> 91</a></span> <spanclass="preprocessor"></span><spanclass="preprocessor">#define USB_TRANSFER_TYPE_ISOCHRONOUS 0x01 // Endpoint is an isochronous endpoint.</span></div>
<divclass="line"><aname="l00092"></a><spanclass="lineno"><aclass="line"href="usb__ch9_8h.html#a54c90d3ca8c3f7911d9d8cb17f59d939"> 92</a></span> <spanclass="preprocessor"></span><spanclass="preprocessor">#define USB_TRANSFER_TYPE_BULK 0x02 // Endpoint is a bulk endpoint.</span></div>
<divclass="line"><aname="l00093"></a><spanclass="lineno"><aclass="line"href="usb__ch9_8h.html#ac80ae240a4a703b554aa8edee201495f"> 93</a></span> <spanclass="preprocessor"></span><spanclass="preprocessor">#define USB_TRANSFER_TYPE_INTERRUPT 0x03 // Endpoint is an interrupt endpoint.</span></div>
<divclass="line"><aname="l00094"></a><spanclass="lineno"><aclass="line"href="usb__ch9_8h.html#ac1b1bcdd6bd4e8c5a65052e914e028d5"> 94</a></span> <spanclass="preprocessor"></span><spanclass="preprocessor">#define bmUSB_TRANSFER_TYPE 0x03 // bit mask to separate transfer type from ISO attributes</span></div>
<divclass="line"><aname="l00097"></a><spanclass="lineno"> 97</span> <spanclass="comment">/* Standard Feature Selectors for CLEAR_FEATURE Requests */</span></div>
<divclass="line"><aname="l00106"></a><spanclass="lineno"><aclass="line"href="struct_u_s_b___d_e_v_i_c_e___d_e_s_c_r_i_p_t_o_r.html#a951dd86a1fee895f356a0be0fc8c0d8f"> 106</a></span>  uint8_t <aclass="code"href="struct_u_s_b___d_e_v_i_c_e___d_e_s_c_r_i_p_t_o_r.html#a951dd86a1fee895f356a0be0fc8c0d8f">bLength</a>; <spanclass="comment">// Length of this descriptor.</span></div>
<divclass="line"><aname="l00107"></a><spanclass="lineno"><aclass="line"href="struct_u_s_b___d_e_v_i_c_e___d_e_s_c_r_i_p_t_o_r.html#aad465b71adef34630171e88b0a3664a3"> 107</a></span>  uint8_t <aclass="code"href="struct_u_s_b___d_e_v_i_c_e___d_e_s_c_r_i_p_t_o_r.html#aad465b71adef34630171e88b0a3664a3">bDescriptorType</a>; <spanclass="comment">// DEVICE descriptor type (USB_DESCRIPTOR_DEVICE).</span></div>
<divclass="line"><aname="l00108"></a><spanclass="lineno"><aclass="line"href="struct_u_s_b___d_e_v_i_c_e___d_e_s_c_r_i_p_t_o_r.html#a621148cd71148fb15e136010480a34ac"> 108</a></span>  uint16_t <aclass="code"href="struct_u_s_b___d_e_v_i_c_e___d_e_s_c_r_i_p_t_o_r.html#a621148cd71148fb15e136010480a34ac">bcdUSB</a>; <spanclass="comment">// USB Spec Release Number (BCD).</span></div>
<divclass="line"><aname="l00109"></a><spanclass="lineno"><aclass="line"href="struct_u_s_b___d_e_v_i_c_e___d_e_s_c_r_i_p_t_o_r.html#afa7047f0318ab6df92a12291511cc1ce"> 109</a></span>  uint8_t <aclass="code"href="struct_u_s_b___d_e_v_i_c_e___d_e_s_c_r_i_p_t_o_r.html#afa7047f0318ab6df92a12291511cc1ce">bDeviceClass</a>; <spanclass="comment">// Class code (assigned by the USB-IF). 0xFF-Vendor specific.</span></div>
<divclass="line"><aname="l00110"></a><spanclass="lineno"><aclass="line"href="struct_u_s_b___d_e_v_i_c_e___d_e_s_c_r_i_p_t_o_r.html#af01535d145805f4bfae66e21f1fc652d"> 110</a></span>  uint8_t <aclass="code"href="struct_u_s_b___d_e_v_i_c_e___d_e_s_c_r_i_p_t_o_r.html#af01535d145805f4bfae66e21f1fc652d">bDeviceSubClass</a>; <spanclass="comment">// Subclass code (assigned by the USB-IF).</span></div>
<divclass="line"><aname="l00111"></a><spanclass="lineno"><aclass="line"href="struct_u_s_b___d_e_v_i_c_e___d_e_s_c_r_i_p_t_o_r.html#af205ea8c5729e0ddbf4dcbdf1636fe57"> 111</a></span>  uint8_t <aclass="code"href="struct_u_s_b___d_e_v_i_c_e___d_e_s_c_r_i_p_t_o_r.html#af205ea8c5729e0ddbf4dcbdf1636fe57">bDeviceProtocol</a>; <spanclass="comment">// Protocol code (assigned by the USB-IF). 0xFF-Vendor specific.</span></div>
<divclass="line"><aname="l00112"></a><spanclass="lineno"><aclass="line"href="struct_u_s_b___d_e_v_i_c_e___d_e_s_c_r_i_p_t_o_r.html#a92d96e9016c96043dccf56872d13a628"> 112</a></span>  uint8_t <aclass="code"href="struct_u_s_b___d_e_v_i_c_e___d_e_s_c_r_i_p_t_o_r.html#a92d96e9016c96043dccf56872d13a628">bMaxPacketSize0</a>; <spanclass="comment">// Maximum packet size for endpoint 0.</span></div>
<divclass="line"><aname="l00113"></a><spanclass="lineno"><aclass="line"href="struct_u_s_b___d_e_v_i_c_e___d_e_s_c_r_i_p_t_o_r.html#ae3c7088fe6f7b521132d8f2b95f958bc"> 113</a></span>  uint16_t <aclass="code"href="struct_u_s_b___d_e_v_i_c_e___d_e_s_c_r_i_p_t_o_r.html#ae3c7088fe6f7b521132d8f2b95f958bc">idVendor</a>; <spanclass="comment">// Vendor ID (assigned by the USB-IF).</span></div>
<divclass="line"><aname="l00114"></a><spanclass="lineno"><aclass="line"href="struct_u_s_b___d_e_v_i_c_e___d_e_s_c_r_i_p_t_o_r.html#adaec05748124a104c3d49008433719ba"> 114</a></span>  uint16_t <aclass="code"href="struct_u_s_b___d_e_v_i_c_e___d_e_s_c_r_i_p_t_o_r.html#adaec05748124a104c3d49008433719ba">idProduct</a>; <spanclass="comment">// Product ID (assigned by the manufacturer).</span></div>
<divclass="line"><aname="l00115"></a><spanclass="lineno"><aclass="line"href="struct_u_s_b___d_e_v_i_c_e___d_e_s_c_r_i_p_t_o_r.html#aa4e565c598b6605cbcfe8cab66f99e65"> 115</a></span>  uint16_t <aclass="code"href="struct_u_s_b___d_e_v_i_c_e___d_e_s_c_r_i_p_t_o_r.html#aa4e565c598b6605cbcfe8cab66f99e65">bcdDevice</a>; <spanclass="comment">// Device release number (BCD).</span></div>
<divclass="line"><aname="l00116"></a><spanclass="lineno"><aclass="line"href="struct_u_s_b___d_e_v_i_c_e___d_e_s_c_r_i_p_t_o_r.html#ad16528e2a4018962f8d7d97036386eac"> 116</a></span>  uint8_t <aclass="code"href="struct_u_s_b___d_e_v_i_c_e___d_e_s_c_r_i_p_t_o_r.html#ad16528e2a4018962f8d7d97036386eac">iManufacturer</a>; <spanclass="comment">// Index of String Descriptor describing the manufacturer.</span></div>
<divclass="line"><aname="l00117"></a><spanclass="lineno"><aclass="line"href="struct_u_s_b___d_e_v_i_c_e___d_e_s_c_r_i_p_t_o_r.html#a63e19361f9fe25a6a2553f7d10569174"> 117</a></span>  uint8_t <aclass="code"href="struct_u_s_b___d_e_v_i_c_e___d_e_s_c_r_i_p_t_o_r.html#a63e19361f9fe25a6a2553f7d10569174">iProduct</a>; <spanclass="comment">// Index of String Descriptor describing the product.</span></div>
<divclass="line"><aname="l00118"></a><spanclass="lineno"><aclass="line"href="struct_u_s_b___d_e_v_i_c_e___d_e_s_c_r_i_p_t_o_r.html#ac9d321b21797ac7a6190ae9a2ffa1e3e"> 118</a></span>  uint8_t <aclass="code"href="struct_u_s_b___d_e_v_i_c_e___d_e_s_c_r_i_p_t_o_r.html#ac9d321b21797ac7a6190ae9a2ffa1e3e">iSerialNumber</a>; <spanclass="comment">// Index of String Descriptor with the device's serial number.</span></div>
<divclass="line"><aname="l00119"></a><spanclass="lineno"><aclass="line"href="struct_u_s_b___d_e_v_i_c_e___d_e_s_c_r_i_p_t_o_r.html#ab1b8db3992e0dceb2ba86f3bab1e5bca"> 119</a></span>  uint8_t <aclass="code"href="struct_u_s_b___d_e_v_i_c_e___d_e_s_c_r_i_p_t_o_r.html#ab1b8db3992e0dceb2ba86f3bab1e5bca">bNumConfigurations</a>; <spanclass="comment">// Number of possible configurations.</span></div>
<divclass="line"><aname="l00124"></a><spanclass="lineno"><aclass="line"href="struct_u_s_b___c_o_n_f_i_g_u_r_a_t_i_o_n___d_e_s_c_r_i_p_t_o_r.html#a2ba304d3cb0f6b506c190ca8391fd1a6"> 124</a></span>  uint8_t <aclass="code"href="struct_u_s_b___c_o_n_f_i_g_u_r_a_t_i_o_n___d_e_s_c_r_i_p_t_o_r.html#a2ba304d3cb0f6b506c190ca8391fd1a6">bLength</a>; <spanclass="comment">// Length of this descriptor.</span></div>
<divclass="line"><aname="l00125"></a><spanclass="lineno"><aclass="line"href="struct_u_s_b___c_o_n_f_i_g_u_r_a_t_i_o_n___d_e_s_c_r_i_p_t_o_r.html#a28bd3308c28df6445b4b63bdaade83c8"> 125</a></span>  uint8_t <aclass="code"href="struct_u_s_b___c_o_n_f_i_g_u_r_a_t_i_o_n___d_e_s_c_r_i_p_t_o_r.html#a28bd3308c28df6445b4b63bdaade83c8">bDescriptorType</a>; <spanclass="comment">// CONFIGURATION descriptor type (USB_DESCRIPTOR_CONFIGURATION).</span></div>
<divclass="line"><aname="l00126"></a><spanclass="lineno"><aclass="line"href="struct_u_s_b___c_o_n_f_i_g_u_r_a_t_i_o_n___d_e_s_c_r_i_p_t_o_r.html#a39499f3dd4e3f1ef1d8a2c9b430bc11b"> 126</a></span>  uint16_t <aclass="code"href="struct_u_s_b___c_o_n_f_i_g_u_r_a_t_i_o_n___d_e_s_c_r_i_p_t_o_r.html#a39499f3dd4e3f1ef1d8a2c9b430bc11b">wTotalLength</a>; <spanclass="comment">// Total length of all descriptors for this configuration.</span></div>
<divclass="line"><aname="l00127"></a><spanclass="lineno"><aclass="line"href="struct_u_s_b___c_o_n_f_i_g_u_r_a_t_i_o_n___d_e_s_c_r_i_p_t_o_r.html#abd647927a872ac856c9f5aaf624bb99f"> 127</a></span>  uint8_t <aclass="code"href="struct_u_s_b___c_o_n_f_i_g_u_r_a_t_i_o_n___d_e_s_c_r_i_p_t_o_r.html#abd647927a872ac856c9f5aaf624bb99f">bNumInterfaces</a>; <spanclass="comment">// Number of interfaces in this configuration.</span></div>
<divclass="line"><aname="l00128"></a><spanclass="lineno"><aclass="line"href="struct_u_s_b___c_o_n_f_i_g_u_r_a_t_i_o_n___d_e_s_c_r_i_p_t_o_r.html#a568d08f2ae98670a707489645a67746b"> 128</a></span>  uint8_t <aclass="code"href="struct_u_s_b___c_o_n_f_i_g_u_r_a_t_i_o_n___d_e_s_c_r_i_p_t_o_r.html#a568d08f2ae98670a707489645a67746b">bConfigurationValue</a>; <spanclass="comment">// Value of this configuration (1 based).</span></div>
<divclass="line"><aname="l00129"></a><spanclass="lineno"><aclass="line"href="struct_u_s_b___c_o_n_f_i_g_u_r_a_t_i_o_n___d_e_s_c_r_i_p_t_o_r.html#a488103d763db8744459d2c94995458b0"> 129</a></span>  uint8_t <aclass="code"href="struct_u_s_b___c_o_n_f_i_g_u_r_a_t_i_o_n___d_e_s_c_r_i_p_t_o_r.html#a488103d763db8744459d2c94995458b0">iConfiguration</a>; <spanclass="comment">// Index of String Descriptor describing the configuration.</span></div>
<divclass="line"><aname="l00131"></a><spanclass="lineno"><aclass="line"href="struct_u_s_b___c_o_n_f_i_g_u_r_a_t_i_o_n___d_e_s_c_r_i_p_t_o_r.html#a3d6088be2999c1189f2a3eb56be51832"> 131</a></span>  uint8_t <aclass="code"href="struct_u_s_b___c_o_n_f_i_g_u_r_a_t_i_o_n___d_e_s_c_r_i_p_t_o_r.html#a3d6088be2999c1189f2a3eb56be51832">bMaxPower</a>; <spanclass="comment">// Maximum power consumed by this configuration.</span></div>
<divclass="line"><aname="l00136"></a><spanclass="lineno"><aclass="line"href="struct_u_s_b___i_n_t_e_r_f_a_c_e___d_e_s_c_r_i_p_t_o_r.html#ad1a0f98931b5e094d33c8c31d4e29ad6"> 136</a></span>  uint8_t <aclass="code"href="struct_u_s_b___i_n_t_e_r_f_a_c_e___d_e_s_c_r_i_p_t_o_r.html#ad1a0f98931b5e094d33c8c31d4e29ad6">bLength</a>; <spanclass="comment">// Length of this descriptor.</span></div>
<divclass="line"><aname="l00137"></a><spanclass="lineno"><aclass="line"href="struct_u_s_b___i_n_t_e_r_f_a_c_e___d_e_s_c_r_i_p_t_o_r.html#a2515bf5c49f849965030c94f50dea285"> 137</a></span>  uint8_t <aclass="code"href="struct_u_s_b___i_n_t_e_r_f_a_c_e___d_e_s_c_r_i_p_t_o_r.html#a2515bf5c49f849965030c94f50dea285">bDescriptorType</a>; <spanclass="comment">// INTERFACE descriptor type (USB_DESCRIPTOR_INTERFACE).</span></div>
<divclass="line"><aname="l00138"></a><spanclass="lineno"><aclass="line"href="struct_u_s_b___i_n_t_e_r_f_a_c_e___d_e_s_c_r_i_p_t_o_r.html#a3ae5da44842f99bbde5cca9b20c6911a"> 138</a></span>  uint8_t <aclass="code"href="struct_u_s_b___i_n_t_e_r_f_a_c_e___d_e_s_c_r_i_p_t_o_r.html#a3ae5da44842f99bbde5cca9b20c6911a">bInterfaceNumber</a>; <spanclass="comment">// Number of this interface (0 based).</span></div>
<divclass="line"><aname="l00139"></a><spanclass="lineno"><aclass="line"href="struct_u_s_b___i_n_t_e_r_f_a_c_e___d_e_s_c_r_i_p_t_o_r.html#a0ddcf6c9bc46ed757e9e15086746b5a1"> 139</a></span>  uint8_t <aclass="code"href="struct_u_s_b___i_n_t_e_r_f_a_c_e___d_e_s_c_r_i_p_t_o_r.html#a0ddcf6c9bc46ed757e9e15086746b5a1">bAlternateSetting</a>; <spanclass="comment">// Value of this alternate interface setting.</span></div>
<divclass="line"><aname="l00140"></a><spanclass="lineno"><aclass="line"href="struct_u_s_b___i_n_t_e_r_f_a_c_e___d_e_s_c_r_i_p_t_o_r.html#a3268bc05bb0147e19f97e50e702fc141"> 140</a></span>  uint8_t <aclass="code"href="struct_u_s_b___i_n_t_e_r_f_a_c_e___d_e_s_c_r_i_p_t_o_r.html#a3268bc05bb0147e19f97e50e702fc141">bNumEndpoints</a>; <spanclass="comment">// Number of endpoints in this interface.</span></div>
<divclass="line"><aname="l00141"></a><spanclass="lineno"><aclass="line"href="struct_u_s_b___i_n_t_e_r_f_a_c_e___d_e_s_c_r_i_p_t_o_r.html#a4d352604355f617fef9509951d573356"> 141</a></span>  uint8_t <aclass="code"href="struct_u_s_b___i_n_t_e_r_f_a_c_e___d_e_s_c_r_i_p_t_o_r.html#a4d352604355f617fef9509951d573356">bInterfaceClass</a>; <spanclass="comment">// Class code (assigned by the USB-IF). 0xFF-Vendor specific.</span></div>
<divclass="line"><aname="l00142"></a><spanclass="lineno"><aclass="line"href="struct_u_s_b___i_n_t_e_r_f_a_c_e___d_e_s_c_r_i_p_t_o_r.html#ad5b51ed2e6540dd58085f10a2440970e"> 142</a></span>  uint8_t <aclass="code"href="struct_u_s_b___i_n_t_e_r_f_a_c_e___d_e_s_c_r_i_p_t_o_r.html#ad5b51ed2e6540dd58085f10a2440970e">bInterfaceSubClass</a>; <spanclass="comment">// Subclass code (assigned by the USB-IF).</span></div>
<divclass="line"><aname="l00143"></a><spanclass="lineno"><aclass="line"href="struct_u_s_b___i_n_t_e_r_f_a_c_e___d_e_s_c_r_i_p_t_o_r.html#afcce1d75b7b110cc0d11e3328d9c7204"> 143</a></span>  uint8_t <aclass="code"href="struct_u_s_b___i_n_t_e_r_f_a_c_e___d_e_s_c_r_i_p_t_o_r.html#afcce1d75b7b110cc0d11e3328d9c7204">bInterfaceProtocol</a>; <spanclass="comment">// Protocol code (assigned by the USB-IF). 0xFF-Vendor specific.</span></div>
<divclass="line"><aname="l00144"></a><spanclass="lineno"><aclass="line"href="struct_u_s_b___i_n_t_e_r_f_a_c_e___d_e_s_c_r_i_p_t_o_r.html#a391ad3184a29ddbe1e02ff1feca8f64a"> 144</a></span>  uint8_t <aclass="code"href="struct_u_s_b___i_n_t_e_r_f_a_c_e___d_e_s_c_r_i_p_t_o_r.html#a391ad3184a29ddbe1e02ff1feca8f64a">iInterface</a>; <spanclass="comment">// Index of String Descriptor describing the interface.</span></div>
<divclass="line"><aname="l00149"></a><spanclass="lineno"><aclass="line"href="struct_u_s_b___e_n_d_p_o_i_n_t___d_e_s_c_r_i_p_t_o_r.html#a55263a9cc9dc17abc37226ac8a471ad0"> 149</a></span>  uint8_t <aclass="code"href="struct_u_s_b___e_n_d_p_o_i_n_t___d_e_s_c_r_i_p_t_o_r.html#a55263a9cc9dc17abc37226ac8a471ad0">bLength</a>; <spanclass="comment">// Length of this descriptor.</span></div>
<divclass="line"><aname="l00150"></a><spanclass="lineno"><aclass="line"href="struct_u_s_b___e_n_d_p_o_i_n_t___d_e_s_c_r_i_p_t_o_r.html#af39d036ab903a96b9d4d56b879555d6c"> 150</a></span>  uint8_t <aclass="code"href="struct_u_s_b___e_n_d_p_o_i_n_t___d_e_s_c_r_i_p_t_o_r.html#af39d036ab903a96b9d4d56b879555d6c">bDescriptorType</a>; <spanclass="comment">// ENDPOINT descriptor type (USB_DESCRIPTOR_ENDPOINT).</span></div>
<divclass="line"><aname="l00151"></a><spanclass="lineno"><aclass="line"href="struct_u_s_b___e_n_d_p_o_i_n_t___d_e_s_c_r_i_p_t_o_r.html#a23fbb539d72d10a6cb12efedf7d3457c"> 151</a></span>  uint8_t <aclass="code"href="struct_u_s_b___e_n_d_p_o_i_n_t___d_e_s_c_r_i_p_t_o_r.html#a23fbb539d72d10a6cb12efedf7d3457c">bEndpointAddress</a>; <spanclass="comment">// Endpoint address. Bit 7 indicates direction (0=OUT, 1=IN).</span></div>
<divclass="line"><aname="l00152"></a><spanclass="lineno"><aclass="line"href="struct_u_s_b___e_n_d_p_o_i_n_t___d_e_s_c_r_i_p_t_o_r.html#a8ee7f1bafac335258c6e742969387f57"> 152</a></span>  uint8_t <aclass="code"href="struct_u_s_b___e_n_d_p_o_i_n_t___d_e_s_c_r_i_p_t_o_r.html#a8ee7f1bafac335258c6e742969387f57">bmAttributes</a>; <spanclass="comment">// Endpoint transfer type.</span></div>
<divclass="line"><aname="l00153"></a><spanclass="lineno"><aclass="line"href="struct_u_s_b___e_n_d_p_o_i_n_t___d_e_s_c_r_i_p_t_o_r.html#af34105fa6bd0029d9c6b73d85f7853c6"> 153</a></span>  uint16_t <aclass="code"href="struct_u_s_b___e_n_d_p_o_i_n_t___d_e_s_c_r_i_p_t_o_r.html#af34105fa6bd0029d9c6b73d85f7853c6">wMaxPacketSize</a>; <spanclass="comment">// Maximum packet size.</span></div>
<divclass="line"><aname="l00154"></a><spanclass="lineno"><aclass="line"href="struct_u_s_b___e_n_d_p_o_i_n_t___d_e_s_c_r_i_p_t_o_r.html#a95cd9669dee9cab375a7c5e62284a01b"> 154</a></span>  uint8_t <aclass="code"href="struct_u_s_b___e_n_d_p_o_i_n_t___d_e_s_c_r_i_p_t_o_r.html#a95cd9669dee9cab375a7c5e62284a01b">bInterval</a>; <spanclass="comment">// Polling interval in frames.</span></div>
<divclass="line"><aname="l00163"></a><spanclass="lineno"><aclass="line"href="struct_u_s_b___h_i_d___d_e_s_c_r_i_p_t_o_r.html#a05f827473d2eb4e67d1f99bc317b1eba"> 163</a></span>  uint8_t <aclass="code"href="struct_u_s_b___h_i_d___d_e_s_c_r_i_p_t_o_r.html#a05f827473d2eb4e67d1f99bc317b1eba">bNumDescriptors</a>; <spanclass="comment">// Number of additional class specific descriptors</span></div>
<divclass="line"><aname="l00164"></a><spanclass="lineno"><aclass="line"href="struct_u_s_b___h_i_d___d_e_s_c_r_i_p_t_o_r.html#a58fcf1ecefd15c5e796ce8798b1dfce5"> 164</a></span>  uint8_t <aclass="code"href="struct_u_s_b___h_i_d___d_e_s_c_r_i_p_t_o_r.html#a58fcf1ecefd15c5e796ce8798b1dfce5">bDescrType</a>; <spanclass="comment">// Type of class descriptor</span></div>
<divclass="line"><aname="l00165"></a><spanclass="lineno"><aclass="line"href="struct_u_s_b___h_i_d___d_e_s_c_r_i_p_t_o_r.html#a0b160c43f6a6132c0debabd6ef171950"> 165</a></span>  uint16_t <aclass="code"href="struct_u_s_b___h_i_d___d_e_s_c_r_i_p_t_o_r.html#a0b160c43f6a6132c0debabd6ef171950">wDescriptorLength</a>; <spanclass="comment">// Total size of the Report descriptor</span></div>
<divclass="line"><aname="l00169"></a><spanclass="lineno"><aclass="line"href="struct_h_i_d___c_l_a_s_s___d_e_s_c_r_i_p_t_o_r___l_e_n___a_n_d___t_y_p_e.html#ade7d2a40026445cd10544b30bf1a4964"> 169</a></span>  uint8_t <aclass="code"href="struct_h_i_d___c_l_a_s_s___d_e_s_c_r_i_p_t_o_r___l_e_n___a_n_d___t_y_p_e.html#ade7d2a40026445cd10544b30bf1a4964">bDescrType</a>; <spanclass="comment">// Type of class descriptor</span></div>
<divclass="line"><aname="l00170"></a><spanclass="lineno"><aclass="line"href="struct_h_i_d___c_l_a_s_s___d_e_s_c_r_i_p_t_o_r___l_e_n___a_n_d___t_y_p_e.html#a98251c1867caf1651f6e926952189201"> 170</a></span>  uint16_t <aclass="code"href="struct_h_i_d___c_l_a_s_s___d_e_s_c_r_i_p_t_o_r___l_e_n___a_n_d___t_y_p_e.html#a98251c1867caf1651f6e926952189201">wDescriptorLength</a>; <spanclass="comment">// Total size of the Report descriptor</span></div>