F1 and F3 HAL / LL libraries
[betaflight.git] / lib / main / STM32F1 / Middlewares / ST / STM32_USB_Host_Library / Core / Inc / usbh_ctlreq.h
blob1d0e202601ff156b830ddf0d073ca6e58bd6ba98
1 /**
2 ******************************************************************************
3 * @file usbh_ctlreq.h
4 * @author MCD Application Team
5 * @version V3.2.2
6 * @date 07-July-2015
7 * @brief Header file for usbh_ctlreq.c
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 ******************************************************************************
26 */
28 /* Define to prevent recursive ----------------------------------------------*/
29 #ifndef __USBH_CTLREQ_H
30 #define __USBH_CTLREQ_H
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
36 /* Includes ------------------------------------------------------------------*/
37 #include "usbh_core.h"
39 /** @addtogroup USBH_LIB
40 * @{
43 /** @addtogroup USBH_LIB_CORE
44 * @{
47 /** @defgroup USBH_CTLREQ
48 * @brief This file is the
49 * @{
50 */
53 /** @defgroup USBH_CTLREQ_Exported_Defines
54 * @{
56 /*Standard Feature Selector for clear feature command*/
57 #define FEATURE_SELECTOR_ENDPOINT 0X00
58 #define FEATURE_SELECTOR_DEVICE 0X01
61 #define INTERFACE_DESC_TYPE 0x04
62 #define ENDPOINT_DESC_TYPE 0x05
63 #define INTERFACE_DESC_SIZE 0x09
65 /**
66 * @}
67 */
70 /** @defgroup USBH_CTLREQ_Exported_Types
71 * @{
72 */
73 /**
74 * @}
75 */
78 /** @defgroup USBH_CTLREQ_Exported_Macros
79 * @{
80 */
81 /**
82 * @}
83 */
85 /** @defgroup USBH_CTLREQ_Exported_Variables
86 * @{
87 */
88 extern uint8_t USBH_CfgDesc[512];
89 /**
90 * @}
91 */
93 /** @defgroup USBH_CTLREQ_Exported_FunctionsPrototype
94 * @{
96 USBH_StatusTypeDef USBH_CtlReq (USBH_HandleTypeDef *phost,
97 uint8_t *buff,
98 uint16_t length);
100 USBH_StatusTypeDef USBH_GetDescriptor(USBH_HandleTypeDef *phost,
101 uint8_t req_type,
102 uint16_t value_idx,
103 uint8_t* buff,
104 uint16_t length );
106 USBH_StatusTypeDef USBH_Get_DevDesc(USBH_HandleTypeDef *phost,
107 uint8_t length);
109 USBH_StatusTypeDef USBH_Get_StringDesc(USBH_HandleTypeDef *phost,
110 uint8_t string_index,
111 uint8_t *buff,
112 uint16_t length);
114 USBH_StatusTypeDef USBH_SetCfg(USBH_HandleTypeDef *phost,
115 uint16_t configuration_value);
117 USBH_StatusTypeDef USBH_Get_CfgDesc(USBH_HandleTypeDef *phost,
118 uint16_t length);
120 USBH_StatusTypeDef USBH_SetAddress(USBH_HandleTypeDef *phost,
121 uint8_t DeviceAddress);
123 USBH_StatusTypeDef USBH_SetInterface(USBH_HandleTypeDef *phost,
124 uint8_t ep_num, uint8_t altSetting);
126 USBH_StatusTypeDef USBH_ClrFeature(USBH_HandleTypeDef *phost,
127 uint8_t ep_num);
129 USBH_DescHeader_t *USBH_GetNextDesc (uint8_t *pbuf,
130 uint16_t *ptr);
132 * @}
135 #ifdef __cplusplus
137 #endif
139 #endif /* __USBH_CTLREQ_H */
142 * @}
146 * @}
150 * @}
153 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/