1<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>struct usb_ep</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="USB Gadget API for Linux"><link rel="up" href="core.html" title="Core Objects and Methods"><link rel="prev" href="API-struct-usb-ep-caps.html" title="struct usb_ep_caps"><link rel="next" href="API-usb-ep-set-maxpacket-limit.html" title="usb_ep_set_maxpacket_limit"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span class="phrase">struct usb_ep</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-struct-usb-ep-caps.html">Prev</a> </td><th width="60%" align="center">Core Objects and Methods</th><td width="20%" align="right"> <a accesskey="n" href="API-usb-ep-set-maxpacket-limit.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-struct-usb-ep"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>struct usb_ep — 2 device side representation of USB endpoint 3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="programlisting"> 4struct usb_ep { 5 void * driver_data; 6 const char * name; 7 const struct usb_ep_ops * ops; 8 struct list_head ep_list; 9 struct usb_ep_caps caps; 10 unsigned maxpacket:16; 11 unsigned maxpacket_limit:16; 12 unsigned max_streams:16; 13 unsigned mult:2; 14 unsigned maxburst:5; 15 u8 address; 16 const struct usb_endpoint_descriptor * desc; 17 const struct usb_ss_ep_comp_descriptor * comp_desc; 18}; </pre></div><div class="refsect1"><a name="id-1.5.9.5.5"></a><h2>Members</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term">driver_data</span></dt><dd><p> 19 for use by the gadget driver. 20 </p></dd><dt><span class="term">name</span></dt><dd><p> 21 identifier for the endpoint, such as <span class="quote">“<span class="quote">ep-a</span>”</span> or <span class="quote">“<span class="quote">ep9in-bulk</span>”</span> 22 </p></dd><dt><span class="term">ops</span></dt><dd><p> 23 Function pointers used to access hardware-specific operations. 24 </p></dd><dt><span class="term">ep_list</span></dt><dd><p> 25 the gadget's ep_list holds all of its endpoints 26 </p></dd><dt><span class="term">caps</span></dt><dd><p> 27 The structure describing types and directions supported by endoint. 28 </p></dd><dt><span class="term">maxpacket</span></dt><dd><p> 29 The maximum packet size used on this endpoint. The initial 30 value can sometimes be reduced (hardware allowing), according to 31 the endpoint descriptor used to configure the endpoint. 32 </p></dd><dt><span class="term">maxpacket_limit</span></dt><dd><p> 33 The maximum packet size value which can be handled by this 34 endpoint. It's set once by UDC driver when endpoint is initialized, and 35 should not be changed. Should not be confused with maxpacket. 36 </p></dd><dt><span class="term">max_streams</span></dt><dd><p> 37 The maximum number of streams supported 38 by this EP (0 - 16, actual number is 2^n) 39 </p></dd><dt><span class="term">mult</span></dt><dd><p> 40 multiplier, 'mult' value for SS Isoc EPs 41 </p></dd><dt><span class="term">maxburst</span></dt><dd><p> 42 the maximum number of bursts supported by this EP (for usb3) 43 </p></dd><dt><span class="term">address</span></dt><dd><p> 44 used to identify the endpoint when finding descriptor that 45 matches connection speed 46 </p></dd><dt><span class="term">desc</span></dt><dd><p> 47 endpoint descriptor. This pointer is set before the endpoint is 48 enabled and remains valid until the endpoint is disabled. 49 </p></dd><dt><span class="term">comp_desc</span></dt><dd><p> 50 In case of SuperSpeed support, this is the endpoint companion 51 descriptor that is used to configure the endpoint 52 </p></dd></dl></div></div><div class="refsect1"><a name="id-1.5.9.5.6"></a><h2>Description</h2><p> 53 the bus controller driver lists all the general purpose endpoints in 54 gadget->ep_list. the control endpoint (gadget->ep0) is not in that list, 55 and is accessed only in response to a driver <code class="function">setup</code> callback. 56</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-struct-usb-ep-caps.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="core.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-usb-ep-set-maxpacket-limit.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">struct usb_ep_caps</span> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <span class="phrase">usb_ep_set_maxpacket_limit</span></td></tr></table></div></body></html> 57