Commit | Line | Data |
---|---|---|
b3147863 CK |
1 | /* ----------------------------------------------------------------------------- |
2 | * Copyright (c) 2011 Ozmo Inc | |
3 | * Released under the GNU General Public License Version 2 (GPLv2). | |
4 | * ----------------------------------------------------------------------------- | |
5 | */ | |
6 | #ifndef _OZUSBIF_H | |
7 | #define _OZUSBIF_H | |
8 | ||
9 | #include <linux/usb.h> | |
10 | ||
11 | /* Reference counting functions. | |
12 | */ | |
13 | void oz_usb_get(void *hpd); | |
14 | void oz_usb_put(void *hpd); | |
15 | ||
16 | /* Stream functions. | |
17 | */ | |
18 | int oz_usb_stream_create(void *hpd, u8 ep_num); | |
19 | int oz_usb_stream_delete(void *hpd, u8 ep_num); | |
20 | ||
21 | /* Request functions. | |
22 | */ | |
23 | int oz_usb_control_req(void *hpd, u8 req_id, struct usb_ctrlrequest *setup, | |
24 | u8 *data, int data_len); | |
25 | int oz_usb_get_desc_req(void *hpd, u8 req_id, u8 req_type, u8 desc_type, | |
26 | u8 index, u16 windex, int offset, int len); | |
27 | int oz_usb_send_isoc(void *hpd, u8 ep_num, struct urb *urb); | |
28 | void oz_usb_request_heartbeat(void *hpd); | |
29 | ||
30 | /* Confirmation functions. | |
31 | */ | |
32 | void oz_hcd_get_desc_cnf(void *hport, u8 req_id, int status, | |
33 | u8 *desc, int length, int offset, int total_size); | |
34 | void oz_hcd_control_cnf(void *hport, u8 req_id, u8 rcode, | |
35 | u8 *data, int data_len); | |
36 | ||
37 | /* Indication functions. | |
38 | */ | |
39 | void oz_hcd_data_ind(void *hport, u8 endpoint, u8 *data, int data_len); | |
40 | ||
41 | int oz_hcd_heartbeat(void *hport); | |
42 | ||
43 | #endif /* _OZUSBIF_H */ |