1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><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-request.html" title="struct usb_request"><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-request.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 unsigned maxpacket:16; 10 unsigned maxpacket_limit:16; 11 unsigned max_streams:16; 12 unsigned mult:2; 13 unsigned maxburst:5; 14 u8 address; 15 const struct usb_endpoint_descriptor * desc; 16 const struct usb_ss_ep_comp_descriptor * comp_desc; 17}; </pre></div><div class="refsect1"><a name="idp1123942732"></a><h2>Members</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term">driver_data</span></dt><dd><p> 18 for use by the gadget driver. 19 </p></dd><dt><span class="term">name</span></dt><dd><p> 20 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> 21 </p></dd><dt><span class="term">ops</span></dt><dd><p> 22 Function pointers used to access hardware-specific operations. 23 </p></dd><dt><span class="term">ep_list</span></dt><dd><p> 24 the gadget's ep_list holds all of its endpoints 25 </p></dd><dt><span class="term">maxpacket</span></dt><dd><p> 26 The maximum packet size used on this endpoint. The initial 27 value can sometimes be reduced (hardware allowing), according to 28 the endpoint descriptor used to configure the endpoint. 29 </p></dd><dt><span class="term">maxpacket_limit</span></dt><dd><p> 30 The maximum packet size value which can be handled by this 31 endpoint. It's set once by UDC driver when endpoint is initialized, and 32 should not be changed. Should not be confused with maxpacket. 33 </p></dd><dt><span class="term">max_streams</span></dt><dd><p> 34 The maximum number of streams supported 35 by this EP (0 - 16, actual number is 2^n) 36 </p></dd><dt><span class="term">mult</span></dt><dd><p> 37 multiplier, 'mult' value for SS Isoc EPs 38 </p></dd><dt><span class="term">maxburst</span></dt><dd><p> 39 the maximum number of bursts supported by this EP (for usb3) 40 </p></dd><dt><span class="term">address</span></dt><dd><p> 41 used to identify the endpoint when finding descriptor that 42 matches connection speed 43 </p></dd><dt><span class="term">desc</span></dt><dd><p> 44 endpoint descriptor. This pointer is set before the endpoint is 45 enabled and remains valid until the endpoint is disabled. 46 </p></dd><dt><span class="term">comp_desc</span></dt><dd><p> 47 In case of SuperSpeed support, this is the endpoint companion 48 descriptor that is used to configure the endpoint 49 </p></dd></dl></div></div><div class="refsect1"><a name="idp1123952660"></a><h2>Description</h2><p> 50 the bus controller driver lists all the general purpose endpoints in 51 gadget->ep_list. the control endpoint (gadget->ep0) is not in that list, 52 and is accessed only in response to a driver <code class="function">setup</code> callback. 53</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-request.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_request</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> 54