<?xml version="1.0" encoding="ANSI_X3.4-1968" standalone="no"?> <!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/html; charset=ANSI_X3.4-1968" /><title>struct usb_ep</title><meta name="generator" content="DocBook XSL Stylesheets V1.75.2" /><link rel="home" href="index.html" title="USB Gadget API for Linux" /><link rel="up" href="ch03s03.html" title="Core Objects and Methods" /><link rel="prev" href="re16.html" title="struct usb_request" /><link rel="next" href="re18.html" title="usb_ep_enable" /></head><body><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span>struct usb_ep</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="re16.html">Prev</a> </td><th width="60%" align="center">Core Objects and Methods</th><td width="20%" align="right"> <a accesskey="n" href="re18.html">Next</a></td></tr></table><hr /></div><div class="refentry" title="struct usb_ep"><a id="API-struct-usb-ep"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>struct usb_ep — device side representation of USB endpoint </p></div><div class="refsynopsisdiv" title="Synopsis"><h2>Synopsis</h2><pre class="programlisting"> struct usb_ep { void * driver_data; const char * name; const struct usb_ep_ops * ops; struct list_head ep_list; unsigned maxpacket:16; }; </pre></div><div class="refsect1" title="Members"><a id="id2992460"></a><h2>Members</h2><div class="variablelist"><dl><dt><span class="term">driver_data</span></dt><dd><p> for use by the gadget driver. all other fields are read-only to gadget drivers. </p></dd><dt><span class="term">name</span></dt><dd><p> 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> </p></dd><dt><span class="term">ops</span></dt><dd><p> Function pointers used to access hardware-specific operations. </p></dd><dt><span class="term">ep_list</span></dt><dd><p> the gadget's ep_list holds all of its endpoints </p></dd><dt><span class="term">maxpacket</span></dt><dd><p> The maximum packet size used on this endpoint. The initial value can sometimes be reduced (hardware allowing), according to the endpoint descriptor used to configure the endpoint. </p></dd></dl></div></div><div class="refsect1" title="Description"><a id="id2992538"></a><h2>Description</h2><p> the bus controller driver lists all the general purpose endpoints in gadget->ep_list. the control endpoint (gadget->ep0) is not in that list, and is accessed only in response to a driver <code class="function">setup</code> callback. </p></div></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="re16.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch03s03.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="re18.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span>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>usb_ep_enable</span></td></tr></table></div></body></html>