2 ******************************************************************************
4 * @author MCD Application Team
7 * @brief Header file for usbh_ctlreq.c
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 ----------------------------------------------*/
29 #ifndef __USBH_CTLREQ_H
30 #define __USBH_CTLREQ_H
36 /* Includes ------------------------------------------------------------------*/
37 #include "usbh_core.h"
39 /** @addtogroup USBH_LIB
43 /** @addtogroup USBH_LIB_CORE
47 /** @defgroup USBH_CTLREQ
48 * @brief This file is the
53 /** @defgroup USBH_CTLREQ_Exported_Defines
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
70 /** @defgroup USBH_CTLREQ_Exported_Types
78 /** @defgroup USBH_CTLREQ_Exported_Macros
85 /** @defgroup USBH_CTLREQ_Exported_Variables
88 extern uint8_t USBH_CfgDesc
[512];
93 /** @defgroup USBH_CTLREQ_Exported_FunctionsPrototype
96 USBH_StatusTypeDef
USBH_CtlReq (USBH_HandleTypeDef
*phost
,
100 USBH_StatusTypeDef
USBH_GetDescriptor(USBH_HandleTypeDef
*phost
,
106 USBH_StatusTypeDef
USBH_Get_DevDesc(USBH_HandleTypeDef
*phost
,
109 USBH_StatusTypeDef
USBH_Get_StringDesc(USBH_HandleTypeDef
*phost
,
110 uint8_t string_index
,
114 USBH_StatusTypeDef
USBH_SetCfg(USBH_HandleTypeDef
*phost
,
115 uint16_t configuration_value
);
117 USBH_StatusTypeDef
USBH_Get_CfgDesc(USBH_HandleTypeDef
*phost
,
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
,
129 USBH_DescHeader_t
*USBH_GetNextDesc (uint8_t *pbuf
,
139 #endif /* __USBH_CTLREQ_H */
153 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/