New SPI API supporting DMA
[betaflight.git] / src / main / msc / usbd_msc_desc.h
blob03a3d9bbcca4860df9138947c4645ef8bff1018e
1 /**
2 ******************************************************************************
3 * @file usbd_desc.h
4 * @author MCD Application Team
5 * @version V1.2.0
6 * @date 09-November-2015
7 * @brief header file for the usbd_desc.c file
8 ******************************************************************************
9 * @attention
11 * <h2><center>&copy; 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 -------------------------------------*/
30 #ifndef __USB_DESC_H
31 #define __USB_DESC_H
33 /* Includes ------------------------------------------------------------------*/
34 #include "usbd_req.h"
36 /** @addtogroup STM32_USB_OTG_DEVICE_LIBRARY
37 * @{
40 /** @defgroup USB_DESC
41 * @brief general defines for the usb device library file
42 * @{
45 /** @defgroup USB_DESC_Exported_Defines
46 * @{
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)
61 #else
62 #define DEVICE_ID1 (0x1FFFF7E8)
63 #define DEVICE_ID2 (0x1FFFF7EA)
64 #define DEVICE_ID3 (0x1FFFF7EC)
65 #endif
67 #define USB_SIZ_STRING_SERIAL 0x1A
68 /**
69 * @}
73 /** @defgroup USBD_DESC_Exported_TypesDefinitions
74 * @{
76 /**
77 * @}
82 /** @defgroup USBD_DESC_Exported_Macros
83 * @{
85 /**
86 * @}
89 /** @defgroup USBD_DESC_Exported_Variables
90 * @{
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;
98 /**
99 * @}
102 /** @defgroup USBD_DESC_Exported_FunctionsPrototype
103 * @{
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 */
120 * @}
123 #endif /* __USBD_DESC_H */
126 * @}
130 * @}
132 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/