ozusbif.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. #include <linux/usb.h>
  9. /* Reference counting functions.
  10. */
  11. void oz_usb_get(void *hpd);
  12. void oz_usb_put(void *hpd);
  13. /* Stream functions.
  14. */
  15. int oz_usb_stream_create(void *hpd, u8 ep_num);
  16. int oz_usb_stream_delete(void *hpd, u8 ep_num);
  17. /* Request functions.
  18. */
  19. int oz_usb_control_req(void *hpd, u8 req_id, struct usb_ctrlrequest *setup,
  20. const u8 *data, int data_len);
  21. int oz_usb_get_desc_req(void *hpd, u8 req_id, u8 req_type, u8 desc_type,
  22. u8 index, __le16 windex, int offset, int len);
  23. int oz_usb_send_isoc(void *hpd, u8 ep_num, struct urb *urb);
  24. void oz_usb_request_heartbeat(void *hpd);
  25. /* Confirmation functions.
  26. */
  27. void oz_hcd_get_desc_cnf(void *hport, u8 req_id, int status,
  28. const u8 *desc, int length, int offset, int total_size);
  29. void oz_hcd_control_cnf(void *hport, u8 req_id, u8 rcode,
  30. const u8 *data, int data_len);
  31. /* Indication functions.
  32. */
  33. void oz_hcd_data_ind(void *hport, u8 endpoint, const u8 *data, int data_len);
  34. int oz_hcd_heartbeat(void *hport);
  35. #endif /* _OZUSBIF_H */