usbd_desc.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. /* USER CODE BEGIN Header */
  2. /**
  3. ******************************************************************************
  4. * @file : usbd_desc.c
  5. * @version : v3.0_Cube
  6. * @brief : Header for usbd_conf.c file.
  7. ******************************************************************************
  8. * @attention
  9. *
  10. * Copyright (c) 2025 STMicroelectronics.
  11. * All rights reserved.
  12. *
  13. * This software is licensed under terms that can be found in the LICENSE file
  14. * in the root directory of this software component.
  15. * If no LICENSE file comes with this software, it is provided AS-IS.
  16. *
  17. ******************************************************************************
  18. */
  19. /* USER CODE END Header */
  20. /* Define to prevent recursive inclusion -------------------------------------*/
  21. #ifndef __USBD_DESC__C__
  22. #define __USBD_DESC__C__
  23. #ifdef __cplusplus
  24. extern "C" {
  25. #endif
  26. /* Includes ------------------------------------------------------------------*/
  27. #include "usbd_def.h"
  28. /* USER CODE BEGIN INCLUDE */
  29. /* USER CODE END INCLUDE */
  30. /** @addtogroup STM32_USB_OTG_DEVICE_LIBRARY
  31. * @{
  32. */
  33. /** @defgroup USBD_DESC USBD_DESC
  34. * @brief Usb device descriptors module.
  35. * @{
  36. */
  37. /** @defgroup USBD_DESC_Exported_Constants USBD_DESC_Exported_Constants
  38. * @brief Constants.
  39. * @{
  40. */
  41. #define DEVICE_ID1 (UID_BASE)
  42. #define DEVICE_ID2 (UID_BASE + 0x4)
  43. #define DEVICE_ID3 (UID_BASE + 0x8)
  44. #define USB_SIZ_STRING_SERIAL 0x1A
  45. /* USER CODE BEGIN EXPORTED_CONSTANTS */
  46. /* USER CODE END EXPORTED_CONSTANTS */
  47. /**
  48. * @}
  49. */
  50. /** @defgroup USBD_DESC_Exported_Defines USBD_DESC_Exported_Defines
  51. * @brief Defines.
  52. * @{
  53. */
  54. /* USER CODE BEGIN EXPORTED_DEFINES */
  55. /* USER CODE END EXPORTED_DEFINES */
  56. /**
  57. * @}
  58. */
  59. /** @defgroup USBD_DESC_Exported_TypesDefinitions USBD_DESC_Exported_TypesDefinitions
  60. * @brief Types.
  61. * @{
  62. */
  63. /* USER CODE BEGIN EXPORTED_TYPES */
  64. /* USER CODE END EXPORTED_TYPES */
  65. /**
  66. * @}
  67. */
  68. /** @defgroup USBD_DESC_Exported_Macros USBD_DESC_Exported_Macros
  69. * @brief Aliases.
  70. * @{
  71. */
  72. /* USER CODE BEGIN EXPORTED_MACRO */
  73. /* USER CODE END EXPORTED_MACRO */
  74. /**
  75. * @}
  76. */
  77. /** @defgroup USBD_DESC_Exported_Variables USBD_DESC_Exported_Variables
  78. * @brief Public variables.
  79. * @{
  80. */
  81. extern USBD_DescriptorsTypeDef CUSTOM_HID_Desc;
  82. /* USER CODE BEGIN EXPORTED_VARIABLES */
  83. /* USER CODE END EXPORTED_VARIABLES */
  84. /**
  85. * @}
  86. */
  87. /** @defgroup USBD_DESC_Exported_FunctionsPrototype USBD_DESC_Exported_FunctionsPrototype
  88. * @brief Public functions declaration.
  89. * @{
  90. */
  91. /* USER CODE BEGIN EXPORTED_FUNCTIONS */
  92. /* USER CODE END EXPORTED_FUNCTIONS */
  93. /**
  94. * @}
  95. */
  96. /**
  97. * @}
  98. */
  99. /**
  100. * @}
  101. */
  102. #ifdef __cplusplus
  103. }
  104. #endif
  105. #endif /* __USBD_DESC__C__ */