| công cụ tìm kiếm bảng dữ liệu linh kiện điện tử |
|
UM0851 bảng dữ liệu(PDF) 75 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
UM0851 bảng dữ liệu(HTML) 75 Page - STMicroelectronics |
|
75 / 245 page ![]() UM0851 Communication device drivers Doc ID 16604 Rev 2 75/245 USBD control You can use the following APIs to configure and program the USB Device. USBD driver usage As explained above, there can be various user defined functions over the Linux gadget framework. Each of the functions (gadgets) exposes its own interface. For example, the USB Ethernet function exposes a netdev interface, the USB serial gadget exposes a tty interface and so on. This makes the usage of the USB gadgets very easy. You can use standard tools for standard interfaces provided by these gadgets. You can find such example usage in: ● linux/Documentation/gadget_printer.txt for usb printer device ● linux/Documentation/gadget_serial.txt for usb serial device SPEAr LSP provides a test gadget driver, "zero gadget", to test the USB Device controller. This gadget does not have any user interface. It just provides two configurations, "source & sink" and "loop back" to support several test cases which can be executed from the USB Host side. On USB Host corresponding to the zero gadget we have a "usbtest" driver which supports several test cases to validate USB through ioctls. A standard application "testusb" is void usb_ep_free_request(struct usb_ep *ep, struct usb_request *req) Frees the allocated request int usb_ep_disable(struct usb_ep *ep) Disables the endpoint ep, so that it is not usable int usb_ep_queue(struct usb_ep *ep, struct usb_request *req, gfp_t gfp_flags) Submist a transfer request on this endpoint (ep) int usb_ep_set_halt(struct usb_ep *ep) Halts a particular endpoint (ep) Table 23. USB device control APIs API Description int usb_gadget_frame_number(struct usb_gadget *gadget) Returns the current Start of Frame number int usb_gadget_wakeup(struct usb_gadget *gadget) Enables the remote wakeup feature of USB Device int usb_gadget_set_selfpowered(struct usb_gadget *gadget) USB Device is self powered int usb_gadget_clear_selfpowered(struct usb_gadget *gadget) USB Device is not self powered but bus powered int usb_gadget_ioctl(struct usb_gadget *, unsigned code, unsigned long param) Configures USB device on configuration change. This API is SPEAr-specific and is mandatory to call on SET CONFIGURATION as it programs the controller accordingly. param points to the function descriptors. Please refer hardware User Manual, USB_CSR (of USBD) register for details. Table 22. Linux gadget endpoint APIs (continued) |
|
Link URL |
| Cho đến nay ALLDATASHEET có giúp ích cho doanh nghiệp của bạn hay không? [ DONATE ] |
Alldatasheet là | Quảng cáo | Liên lạc với chúng tôi | Chính sách bảo mật | Liên kết đến bảng dữ liệu | Trao đổi link | Tìm kiếm theo nhà sản xuất 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 |