David Brownell | a400cad | 2008-06-19 17:55:23 -0700 | [diff] [blame] | 1 | /* |
| 2 | * This header declares the utility functions used by "Gadget Zero", plus |
| 3 | * interfaces to its two single-configuration function drivers. |
| 4 | */ |
| 5 | |
| 6 | #ifndef __G_ZERO_H |
| 7 | #define __G_ZERO_H |
| 8 | |
Sebastian Andrzej Siewior | cf9a08a | 2012-12-23 21:10:01 +0100 | [diff] [blame^] | 9 | struct usb_zero_options { |
| 10 | unsigned pattern; |
| 11 | unsigned isoc_interval; |
| 12 | unsigned isoc_maxpacket; |
| 13 | unsigned isoc_mult; |
| 14 | unsigned isoc_maxburst; |
| 15 | unsigned bulk_buflen; |
| 16 | unsigned qlen; |
| 17 | }; |
David Brownell | a400cad | 2008-06-19 17:55:23 -0700 | [diff] [blame] | 18 | |
Sebastian Andrzej Siewior | cf9a08a | 2012-12-23 21:10:01 +0100 | [diff] [blame^] | 19 | struct f_ss_opts { |
| 20 | struct usb_function_instance func_inst; |
| 21 | unsigned pattern; |
| 22 | unsigned isoc_interval; |
| 23 | unsigned isoc_maxpacket; |
| 24 | unsigned isoc_mult; |
| 25 | unsigned isoc_maxburst; |
| 26 | unsigned bulk_buflen; |
| 27 | }; |
| 28 | |
| 29 | struct f_lb_opts { |
| 30 | struct usb_function_instance func_inst; |
| 31 | unsigned bulk_buflen; |
| 32 | unsigned qlen; |
| 33 | }; |
| 34 | |
| 35 | void lb_modexit(void); |
| 36 | int lb_modinit(void); |
David Brownell | a400cad | 2008-06-19 17:55:23 -0700 | [diff] [blame] | 37 | |
| 38 | /* common utilities */ |
Paul Zimmerman | b4036cc | 2012-04-16 14:19:06 -0700 | [diff] [blame] | 39 | struct usb_request *alloc_ep_req(struct usb_ep *ep, int len); |
David Brownell | a400cad | 2008-06-19 17:55:23 -0700 | [diff] [blame] | 40 | void free_ep_req(struct usb_ep *ep, struct usb_request *req); |
| 41 | void disable_endpoints(struct usb_composite_dev *cdev, |
Paul Zimmerman | b4036cc | 2012-04-16 14:19:06 -0700 | [diff] [blame] | 42 | struct usb_ep *in, struct usb_ep *out, |
| 43 | struct usb_ep *iso_in, struct usb_ep *iso_out); |
David Brownell | a400cad | 2008-06-19 17:55:23 -0700 | [diff] [blame] | 44 | |
David Brownell | a400cad | 2008-06-19 17:55:23 -0700 | [diff] [blame] | 45 | #endif /* __G_ZERO_H */ |