2 ******************************************************************************
4 * @author MCD Application Team
6 * @date 09-November-2015
7 * @brief header file for the usbd_desc.c file
8 ******************************************************************************
11 * <h2><center>© COPYRIGHT 2015 STMicroelectronics</center></h2>
13 * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
14 * You may not use this file except in compliance with the License.
15 * You may obtain a copy of the License at:
17 * http://www.st.com/software_license_agreement_liberty_v2
19 * Unless required by applicable law or agreed to in writing, software
20 * distributed under the License is distributed on an "AS IS" BASIS,
21 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 * See the License for the specific language governing permissions and
23 * limitations under the License.
25 ******************************************************************************
28 /* Define to prevent recursive inclusion -------------------------------------*/
33 /* Includes ------------------------------------------------------------------*/
36 /** @addtogroup STM32_USB_OTG_DEVICE_LIBRARY
40 /** @defgroup USB_DESC
41 * @brief general defines for the usb device library file
45 /** @defgroup USB_DESC_Exported_Defines
48 #define USB_DEVICE_DESCRIPTOR_TYPE 0x01
49 #define USB_CONFIGURATION_DESCRIPTOR_TYPE 0x02
50 #define USB_STRING_DESCRIPTOR_TYPE 0x03
51 #define USB_INTERFACE_DESCRIPTOR_TYPE 0x04
52 #define USB_ENDPOINT_DESCRIPTOR_TYPE 0x05
53 #define USB_SIZ_DEVICE_DESC 18
54 #define USB_SIZ_STRING_LANGID 4
56 #if !defined (USE_STM3210C_EVAL)
57 #define DEVICE_ID1 (0x1FFF7A10)
58 #define DEVICE_ID2 (0x1FFF7A14)
59 #define DEVICE_ID3 (0x1FFF7A18)
62 #define DEVICE_ID1 (0x1FFFF7E8)
63 #define DEVICE_ID2 (0x1FFFF7EA)
64 #define DEVICE_ID3 (0x1FFFF7EC)
67 #define USB_SIZ_STRING_SERIAL 0x1A
73 /** @defgroup USBD_DESC_Exported_TypesDefinitions
82 /** @defgroup USBD_DESC_Exported_Macros
89 /** @defgroup USBD_DESC_Exported_Variables
92 extern uint8_t USBD_DeviceDesc
[USB_SIZ_DEVICE_DESC
];
93 extern uint8_t USBD_StrDesc
[USB_MAX_STR_DESC_SIZ
];
94 extern uint8_t USBD_OtherSpeedCfgDesc
[USB_LEN_CFG_DESC
];
95 extern uint8_t USBD_DeviceQualifierDesc
[USB_LEN_DEV_QUALIFIER_DESC
];
96 extern uint8_t USBD_LangIDDesc
[USB_SIZ_STRING_LANGID
];
97 extern USBD_DEVICE USR_desc
;
102 /** @defgroup USBD_DESC_Exported_FunctionsPrototype
107 uint8_t * USBD_USR_DeviceDescriptor( uint8_t speed
, uint16_t *length
);
108 uint8_t * USBD_USR_LangIDStrDescriptor( uint8_t speed
, uint16_t *length
);
109 uint8_t * USBD_USR_ManufacturerStrDescriptor ( uint8_t speed
, uint16_t *length
);
110 uint8_t * USBD_USR_ProductStrDescriptor ( uint8_t speed
, uint16_t *length
);
111 uint8_t * USBD_USR_SerialStrDescriptor( uint8_t speed
, uint16_t *length
);
112 uint8_t * USBD_USR_ConfigStrDescriptor( uint8_t speed
, uint16_t *length
);
113 uint8_t * USBD_USR_InterfaceStrDescriptor( uint8_t speed
, uint16_t *length
);
115 #ifdef USB_SUPPORT_USER_STRING_DESC
116 uint8_t * USBD_USR_USRStringDesc (uint8_t speed
, uint8_t idx
, uint16_t *length
);
117 #endif /* USB_SUPPORT_USER_STRING_DESC */
123 #endif /* __USBD_DESC_H */
132 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/