usb_cops_func.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. /* Copyright (C) 2020 RDA Technologies Limited and/or its affiliates("RDA").
  2. * All rights reserved.
  3. *
  4. * This software is supplied "AS IS" without any warranties.
  5. * RDA assumes no responsibility or liability for the use of the software,
  6. * conveys no license or title under any patent, copyright, or mask work
  7. * right to the product. RDA reserves the right to make changes in the
  8. * software without notification. RDA also make no representation or
  9. * warranty that such application will be suitable for the specified use
  10. * without further testing or modification.
  11. */
  12. #ifndef _USB__COPS_FUNC_H_
  13. #define _USB__COPS_FUNC_H_
  14. #include "osi_compiler.h"
  15. OSI_EXTERN_C_BEGIN
  16. #include "usb/usb_composite_device.h"
  17. #include "quec_proj_config.h"
  18. typedef enum
  19. {
  20. USB_FUNC_GENERIC_SERIAL = 0,
  21. USB_FUNC_DEBUG_SERIAL,
  22. USB_FUNC_CDC_ACM,
  23. USB_FUNC_CCID,
  24. USB_FUNC_CDC_ECM,
  25. USB_FUNC_RNDIS,
  26. USB_FUNC_COUNT,
  27. } usbCopsFuncID_t;
  28. /**
  29. * @brief Create a generic serial function instance
  30. *
  31. * @param name serial name
  32. * @return
  33. * - NULL fail
  34. * - other the serial function
  35. */
  36. copsFunc_t *createSerialFunc(uint32_t name);
  37. #ifdef CONFIG_QUEC_PROJECT_FEATURE_USB_AUDIO
  38. extern copsFunc_t *createUacFunc(uint32_t name);
  39. #endif
  40. /**
  41. * @brief Create a debugging serial function instance
  42. *
  43. * @param name serial name
  44. * @return
  45. * - NULL fail
  46. * - other the serial function
  47. */
  48. copsFunc_t *createDebugSerialFunc(uint32_t name);
  49. /**
  50. * @brief Create a rndis function instance
  51. *
  52. * @return
  53. * - NULL fail
  54. * - other the rndis function
  55. */
  56. copsFunc_t *createRndisFunc(void);
  57. /**
  58. * @brief Create an ECM function instance
  59. *
  60. * @return
  61. * - NULL fail
  62. * - other the rndis function
  63. */
  64. copsFunc_t *createEcmFunc(void);
  65. /**
  66. * @brief Create a CCID function instance
  67. *
  68. * @param name device name
  69. * @return
  70. * - NULL fail
  71. * - other the CCID function
  72. */
  73. copsFunc_t *createCCIDFunc(uint32_t name);
  74. /**
  75. * @brief Create a CDC-ACM function
  76. *
  77. * @param name function name
  78. * @return
  79. * - NULL fail
  80. * - other the function
  81. */
  82. copsFunc_t *createCdcAcmFunc(uint32_t name);
  83. /**
  84. * @brief Create a DEBUG-CDC-ACM function
  85. *
  86. * @param name function name
  87. * @return
  88. * - NULL fail
  89. * - other the function
  90. */
  91. copsFunc_t *createDebugCdcAcmFunc(uint32_t name);
  92. /**
  93. * @brief Create a MTP function
  94. *
  95. * @param name function name
  96. * @return
  97. * - NULL fail
  98. * - other the function
  99. */
  100. copsFunc_t *createMTPFunc(uint32_t name);
  101. OSI_EXTERN_C_END
  102. #endif