descriptor_test.h 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. /*
  2. * The MIT License (MIT)
  3. *
  4. * Copyright (c) 2019 Ha Thach (tinyusb.org)
  5. *
  6. * Permission is hereby granted, free of charge, to any person obtaining a copy
  7. * of this software and associated documentation files (the "Software"), to deal
  8. * in the Software without restriction, including without limitation the rights
  9. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  10. * copies of the Software, and to permit persons to whom the Software is
  11. * furnished to do so, subject to the following conditions:
  12. *
  13. * The above copyright notice and this permission notice shall be included in
  14. * all copies or substantial portions of the Software.
  15. *
  16. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  17. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  18. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  19. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  20. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  21. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  22. * THE SOFTWARE.
  23. *
  24. * This file is part of the TinyUSB stack.
  25. */
  26. /** \file
  27. * \brief TBD
  28. *
  29. * \note TBD
  30. */
  31. /** \ingroup TBD
  32. * \defgroup TBD
  33. * \brief TBD
  34. *
  35. * @{
  36. */
  37. #ifndef _TUSB_TEST_DESCRIPTOR_H_
  38. #define _TUSB_TEST_DESCRIPTOR_H_
  39. #ifdef __cplusplus
  40. extern "C" {
  41. #endif
  42. #include "common/common.h"
  43. #include "class/hid.h"
  44. #include "class/msc.h"
  45. #include "class/cdc.h"
  46. typedef struct
  47. {
  48. tusb_desc_configuration_t configuration;
  49. #if 0 //&& IAD_DESC_REQUIRED
  50. tusb_desc_interface_assoc_t CDC_IAD;
  51. #endif
  52. #if 0 //&& CFG_TUD_CDC
  53. //CDC - Serial
  54. //CDC Control Interface
  55. tusb_desc_interface_t CDC_CCI_Interface;
  56. CDC_HEADER_DESCRIPTOR CDC_Header;
  57. CDC_ABSTRACT_CONTROL_MANAGEMENT_DESCRIPTOR CDC_ACM;
  58. CDC_UNION_1SLAVE_DESCRIPTOR CDC_Union;
  59. tusb_desc_endpoint_t CDC_NotificationEndpoint;
  60. //CDC Data Interface
  61. tusb_desc_interface_t CDC_DCI_Interface;
  62. tusb_desc_endpoint_t CDC_DataOutEndpoint;
  63. tusb_desc_endpoint_t CDC_DataInEndpoint;
  64. #endif
  65. //------------- HID Keyboard -------------//
  66. tusb_desc_interface_t keyboard_interface;
  67. tusb_hid_descriptor_hid_t keyboard_hid;
  68. tusb_desc_endpoint_t keyboard_endpoint;
  69. //------------- HID Mouse -------------//
  70. tusb_desc_interface_t mouse_interface;
  71. tusb_hid_descriptor_hid_t mouse_hid;
  72. tusb_desc_endpoint_t mouse_endpoint;
  73. //------------- Mass Storage -------------//
  74. tusb_desc_interface_t msc_interface;
  75. tusb_desc_endpoint_t msc_endpoint_in;
  76. tusb_desc_endpoint_t msc_endpoint_out;
  77. //------------- CDC Serial -------------//
  78. //CDC Control Interface
  79. tusb_desc_interface_t cdc_comm_interface;
  80. cdc_desc_func_header_t cdc_header;
  81. cdc_desc_func_acm_t cdc_acm;
  82. cdc_desc_func_union_t cdc_union;
  83. tusb_desc_endpoint_t cdc_endpoint_notification;
  84. //CDC Data Interface
  85. tusb_desc_interface_t cdc_data_interface;
  86. tusb_desc_endpoint_t cdc_endpoint_out;
  87. tusb_desc_endpoint_t cdc_endpoint_in;
  88. unsigned char ConfigDescTermination;
  89. } app_configuration_desc_t;
  90. extern tusb_desc_device_t const desc_device;
  91. extern app_configuration_desc_t const desc_configuration;
  92. extern const uint8_t keyboard_report_descriptor[];
  93. #ifdef __cplusplus
  94. }
  95. #endif
  96. #endif /* _TUSB_TEST_DESCRIPTOR_H_ */
  97. /** @} */