| Electronic Components Datasheet Search |
|
UM0851 Datasheet(PDF) 72 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
UM0851 Datasheet(HTML) 72 Page - STMicroelectronics |
|
72 / 245 page ![]() Communication device drivers UM0851 72/245 Doc ID 16604 Rev 2 .ioctl = spear_ioctl, }; /* endpoint specific operations exported by usbd driver */ static struct usb_ep_ops spear_udc_ep_ops = { .enable = spear_ep_enable, .disable = spear_ep_disable, .alloc_request = spear_ep_alloc_request, .free_request = spear_ep_free_request, .queue = spear_ep_queue, .dequeue = spear_ep_dequeue, .set_halt = spear_ep_set_halt, .fifo_status = spear_ep_fifo_status, .fifo_flush = spear_ep_fifo_flush, }; /* routine exported by usbd driver for gadgets to register */ int usb_gadget_register_driver(struct usb_gadget_driver *driver); /* routine exported by usbd driver for gadgets to un-register */ int usb_gadget_unregister_driver(struct usb_gadget_driver *driver); The composite device layer registers to the gadget framework by calling the above APIs and exposes an interface which can be used by different functions (gadgets) to represent a composite device. 4.4.4 Composite device interface The composite device is designed in such way that, the driver should first register to the composite layer. During registration, it passes some of the device related details (device, string descriptor) to the composite layer. After that, the composite device needs to add configuration (multiple is also possible) and then individual functions can add their interfaces. The following figure shows a simple gadget driver ("zero gadget") available with SPEAr LSP. This gadget driver is build over a composite layer (although it is not a composite device) and is mainly used for testing the USB Device controller. It provides two configurations: in the first one, a source/sink function generating/consuming USB packets, and in the second one, loop back feature. We refer to this example gadget driver in the explanations given throughout this part of the document. This driver can be found in linux/drivers/usb/gadget/zero.c. Figure 17. Zero gadget device Source/Sink Config Zero gadget device Loop back Config Function 1 Interface 0 Interface 0 Function 1 OUT Endpoint OUT Endpoint IN Endpoint IN Endpoint |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |