config_ep_by_speed(9)

config_ep_by_speed9

Configures the given endpoint according to gadget speed.

Usage

int config_ep_by_speed(struct usb_gadget * g, struct usb_function * f, struct usb_ep * _ep);

Arguments

g

pointer to the gadget

f

usb function

_ep

the endpoint to configure

Return

error code, 0 on success

This function chooses the right descriptors for a given endpoint according to gadget speed and saves it in the endpoint desc field. If the endpoint already has a descriptor assigned to it - overwrites it with currently corresponding descriptor. The endpoint maxpacket field is updated according to the chosen descriptor.

Note

the supplied function should hold all the descriptors for supported speeds

Releases

3 releases since Debian 7 (Wheezy); the text changed 2 times.

  1. 7
  2. 8
  3. 9

Author

David Brownell <[email protected]>

Author.

From linux-manual-4.9 4.9.228-1 in Debian 9 (Stretch). Parsed by carta from the page's man source.