usb_rdbd.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * Copyright (c) 2018, Real-Thread Information Technology Ltd
  3. * All rights reserved
  4. *
  5. * This software is dual-licensed: you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License version 2 as
  7. * published by the Free Software Foundation. For the terms of this
  8. * license, see <http://www.gnu.org/licenses/>.
  9. *
  10. * You are free to use this software under the terms of the GNU General
  11. * Public License, but WITHOUT ANY WARRANTY; without even the implied
  12. * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  13. * See the GNU General Public License for more details.
  14. *
  15. * Alternatively, you can license this software under a commercial
  16. * license, please send mail to business@rt-thread.com for contact.
  17. *
  18. * Change Logs:
  19. * Date Author Notes
  20. * 2018-09-25 ZYH the first version
  21. */
  22. #ifndef __USB_RDBD_H__
  23. #define __USB_RDBD_H__
  24. #include <rdbd.h>
  25. #ifdef __cplusplus
  26. extern "C" {
  27. #endif
  28. struct usb_rdbd_descriptor
  29. {
  30. #ifdef RT_USB_DEVICE_COMPOSITE
  31. struct uiad_descriptor iad_desc;
  32. #endif
  33. struct uinterface_descriptor intf_desc;
  34. struct uendpoint_descriptor ep_out_desc;
  35. struct uendpoint_descriptor ep_in_desc;
  36. };
  37. typedef struct usb_rdbd_descriptor* usb_rdbd_desc_t;
  38. #define RDBD_CMD_GET_SERVICE_LIST 0x80
  39. #define RDBD_CMD_GET_SERVICE_PIPE_ADDR 0x81
  40. #ifdef __cplusplus
  41. }
  42. #endif
  43. #endif