Create release.yml
[betaflight.git] / lib / main / STM32_USB-FS-Device_Driver / inc / usb_def.h
blob7f6e1b508bb36bb7467e9d8aaf38615b6d5dc92c
1 /**
2 ******************************************************************************
3 * @file usb_def.h
4 * @author MCD Application Team
5 * @version V4.0.0
6 * @date 28-August-2012
7 * @brief Definitions related to USB Core
8 ******************************************************************************
9 * @attention
11 * <h2><center>&copy; COPYRIGHT 2012 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 -------------------------------------*/
29 #ifndef __USB_DEF_H
30 #define __USB_DEF_H
32 /* Includes ------------------------------------------------------------------*/
33 /* Exported types ------------------------------------------------------------*/
34 typedef enum _RECIPIENT_TYPE
36 DEVICE_RECIPIENT, /* Recipient device */
37 INTERFACE_RECIPIENT, /* Recipient interface */
38 ENDPOINT_RECIPIENT, /* Recipient endpoint */
39 OTHER_RECIPIENT
40 } RECIPIENT_TYPE;
43 typedef enum _STANDARD_REQUESTS
45 GET_STATUS = 0,
46 CLEAR_FEATURE,
47 RESERVED1,
48 SET_FEATURE,
49 RESERVED2,
50 SET_ADDRESS,
51 GET_DESCRIPTOR,
52 SET_DESCRIPTOR,
53 GET_CONFIGURATION,
54 SET_CONFIGURATION,
55 GET_INTERFACE,
56 SET_INTERFACE,
57 TOTAL_sREQUEST, /* Total number of Standard request */
58 SYNCH_FRAME = 12
59 } STANDARD_REQUESTS;
61 /* Definition of "USBwValue" */
62 typedef enum _DESCRIPTOR_TYPE
64 DEVICE_DESCRIPTOR = 1,
65 CONFIG_DESCRIPTOR,
66 STRING_DESCRIPTOR,
67 INTERFACE_DESCRIPTOR,
68 ENDPOINT_DESCRIPTOR
69 } DESCRIPTOR_TYPE;
71 /* Feature selector of a SET_FEATURE or CLEAR_FEATURE */
72 typedef enum _FEATURE_SELECTOR
74 ENDPOINT_STALL,
75 DEVICE_REMOTE_WAKEUP
76 } FEATURE_SELECTOR;
78 /* Exported constants --------------------------------------------------------*/
79 /* Definition of "USBbmRequestType" */
80 #define REQUEST_TYPE 0x60 /* Mask to get request type */
81 #define STANDARD_REQUEST 0x00 /* Standard request */
82 #define CLASS_REQUEST 0x20 /* Class request */
83 #define VENDOR_REQUEST 0x40 /* Vendor request */
85 #define RECIPIENT 0x1F /* Mask to get recipient */
87 /* Exported macro ------------------------------------------------------------*/
88 /* Exported functions ------------------------------------------------------- */
90 #endif /* __USB_DEF_H */
92 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/