adk.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * File : adk.h
  3. * This file is part of RT-Thread RTOS
  4. * COPYRIGHT (C) 2011, RT-Thread Development Team
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License along
  17. * with this program; if not, write to the Free Software Foundation, Inc.,
  18. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  19. *
  20. * Change Logs:
  21. * Date Author Notes
  22. * 2011-12-12 Yi Qiu first version
  23. */
  24. #ifndef __HID_H__
  25. #define __HID_H__
  26. #include <rtthread.h>
  27. struct uadkinst
  28. {
  29. upipe_t pipe_in;
  30. upipe_t pipe_out;
  31. struct rt_device device;
  32. };
  33. typedef struct uadkinst* uadk_t;
  34. #define USB_ACCESSORY_VENDOR_ID 0x18D1
  35. #define USB_ACCESSORY_PRODUCT_ID 0x2D00
  36. #define USB_ACCESSORY_ADB_PRODUCT_ID 0x2D01
  37. #define ACCESSORY_STRING_MANUFACTURER 0
  38. #define ACCESSORY_STRING_MODEL 1
  39. #define ACCESSORY_STRING_DESCRIPTION 2
  40. #define ACCESSORY_STRING_VERSION 3
  41. #define ACCESSORY_STRING_URI 4
  42. #define ACCESSORY_STRING_SERIAL 5
  43. #define USB_REQ_GET_PROTOCOL 51
  44. #define USB_REQ_SEND_STRING 52
  45. #define USB_REQ_START 53
  46. #define USB_CLASS_ADK 0xff
  47. #endif