ARMEBS4  revision-26.06.2015
usbd_desc.h
1 #include "heivs/config.h"
2 #if (USE_STM32_USB_USE_DEVICE_MODE)
3 /**
4  ******************************************************************************
5  * @file usbd_desc.h
6  * @author MCD Application Team
7  * @version V1.0.0
8  * @date 19-September-2011
9  * @brief header file for the usbd_desc.c file
10  ******************************************************************************
11  * @attention
12  *
13  * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
14  * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
15  * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
16  * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
17  * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
18  * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
19  *
20  * <h2><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h2>
21  ******************************************************************************
22  */
23 
24 /* Define to prevent recursive inclusion -------------------------------------*/
25 
26 #ifndef __USB_DESC_H
27 #define __USB_DESC_H
28 
29 /* Includes ------------------------------------------------------------------*/
30 #include "stm32/usb/usbd_def.h"
31 #include "config/usbd_conf.h"
32 
33 /** @addtogroup STM32_USB_OTG_DEVICE_LIBRARY
34  * @{
35  */
36 
37 /** @defgroup USB_DESC
38  * @brief general defines for the usb device library file
39  * @{
40  */
41 
42 /** @defgroup USB_DESC_Exported_Defines
43  * @{
44  */
45 #define USB_DEVICE_DESCRIPTOR_TYPE 0x01
46 #define USB_CONFIGURATION_DESCRIPTOR_TYPE 0x02
47 #define USB_STRING_DESCRIPTOR_TYPE 0x03
48 #define USB_INTERFACE_DESCRIPTOR_TYPE 0x04
49 #define USB_ENDPOINT_DESCRIPTOR_TYPE 0x05
50 #define USB_SIZ_DEVICE_DESC 18
51 #define USB_SIZ_STRING_LANGID 4
52 
53 /**
54  * @}
55  */
56 
57 
58 /** @defgroup USBD_DESC_Exported_TypesDefinitions
59  * @{
60  */
61 /**
62  * @}
63  */
64 
65 
66 
67 /** @defgroup USBD_DESC_Exported_Macros
68  * @{
69  */
70 /**
71  * @}
72  */
73 
74 /** @defgroup USBD_DESC_Exported_Variables
75  * @{
76  */
77 extern uint8_t USBD_DeviceDesc [USB_SIZ_DEVICE_DESC];
78 extern uint8_t USBD_StrDesc[USB_MAX_STR_DESC_SIZ];
79 extern uint8_t USBD_OtherSpeedCfgDesc[USB_LEN_CFG_DESC];
80 extern uint8_t USBD_DeviceQualifierDesc[USB_LEN_DEV_QUALIFIER_DESC];
81 extern uint8_t USBD_LangIDDesc[USB_SIZ_STRING_LANGID];
82 extern USBD_DEVICE USR_desc;
83 /**
84  * @}
85  */
86 
87 /** @defgroup USBD_DESC_Exported_FunctionsPrototype
88  * @{
89  */
90 
91 
92 uint8_t * USBD_USR_DeviceDescriptor( uint8_t speed , uint16_t *length);
93 uint8_t * USBD_USR_LangIDStrDescriptor( uint8_t speed , uint16_t *length);
94 uint8_t * USBD_USR_ManufacturerStrDescriptor ( uint8_t speed , uint16_t *length);
95 uint8_t * USBD_USR_ProductStrDescriptor ( uint8_t speed , uint16_t *length);
96 uint8_t * USBD_USR_SerialStrDescriptor( uint8_t speed , uint16_t *length);
97 uint8_t * USBD_USR_ConfigStrDescriptor( uint8_t speed , uint16_t *length);
98 uint8_t * USBD_USR_InterfaceStrDescriptor( uint8_t speed , uint16_t *length);
99 
100 #ifdef USB_SUPPORT_USER_STRING_DESC
101 uint8_t * USBD_USR_USRStringDesc (uint8_t speed, uint8_t idx , uint16_t *length);
102 #endif /* USB_SUPPORT_USER_STRING_DESC */
103 
104 /**
105  * @}
106  */
107 
108 #endif /* __USBD_DESC_H */
109 
110 /**
111  * @}
112  */
113 
114 /**
115 * @}
116 */
117 /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
118 #endif /* (USE_STM32_USB_HOST_MODE || USE_STM32_USB_USE_DEVICE_MODE || USE_STM32_USB_OTG_MODE) */
libheivs configuration file