g_zero.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * This header declares the utility functions used by "Gadget Zero", plus
  3. * interfaces to its two single-configuration function drivers.
  4. */
  5. #ifndef __G_ZERO_H
  6. #define __G_ZERO_H
  7. struct usb_zero_options {
  8. unsigned pattern;
  9. unsigned isoc_interval;
  10. unsigned isoc_maxpacket;
  11. unsigned isoc_mult;
  12. unsigned isoc_maxburst;
  13. unsigned bulk_buflen;
  14. unsigned qlen;
  15. };
  16. struct f_ss_opts {
  17. struct usb_function_instance func_inst;
  18. unsigned pattern;
  19. unsigned isoc_interval;
  20. unsigned isoc_maxpacket;
  21. unsigned isoc_mult;
  22. unsigned isoc_maxburst;
  23. unsigned bulk_buflen;
  24. };
  25. struct f_lb_opts {
  26. struct usb_function_instance func_inst;
  27. unsigned bulk_buflen;
  28. unsigned qlen;
  29. };
  30. void lb_modexit(void);
  31. int lb_modinit(void);
  32. /* common utilities */
  33. struct usb_request *alloc_ep_req(struct usb_ep *ep, int len);
  34. void free_ep_req(struct usb_ep *ep, struct usb_request *req);
  35. void disable_endpoints(struct usb_composite_dev *cdev,
  36. struct usb_ep *in, struct usb_ep *out,
  37. struct usb_ep *iso_in, struct usb_ep *iso_out);
  38. #endif /* __G_ZERO_H */