ARMEBS4  revision-26.06.2015
usbh_stdreq.h
1 #include "heivs/config.h"
2 #if (USE_STM32_USB_HOST_MODE || USE_STM32_USB_USE_DEVICE_MODE || USE_STM32_USB_OTG_MODE)
3 /**
4  ******************************************************************************
5  * @file usbh_stdreq.h
6  * @author MCD Application Team
7  * @version V2.1.0
8  * @date 19-March-2012
9  * @brief Header file for usbh_stdreq.c
10  ******************************************************************************
11  * @attention
12  *
13  * <h2><center>&copy; COPYRIGHT 2012 STMicroelectronics</center></h2>
14  *
15  * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
16  * You may not use this file except in compliance with the License.
17  * You may obtain a copy of the License at:
18  *
19  * http://www.st.com/software_license_agreement_liberty_v2
20  *
21  * Unless required by applicable law or agreed to in writing, software
22  * distributed under the License is distributed on an "AS IS" BASIS,
23  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
24  * See the License for the specific language governing permissions and
25  * limitations under the License.
26  *
27  ******************************************************************************
28  */
29 
30 /* Define to prevent recursive ----------------------------------------------*/
31 #ifndef __USBH_STDREQ_H
32 #define __USBH_STDREQ_H
33 
34 /* Includes ------------------------------------------------------------------*/
35 #include "config/usb_conf.h"
36 #include "stm32/usb/usb_hcd.h"
37 #include "stm32/usb/usbh_core.h"
38 #include "stm32/usb/usbh_def.h"
39 
40 /** @addtogroup USBH_LIB
41  * @{
42  */
43 
44 /** @addtogroup USBH_LIB_CORE
45 * @{
46 */
47 
48 /** @defgroup USBH_STDREQ
49  * @brief This file is the
50  * @{
51  */
52 
53 
54 /** @defgroup USBH_STDREQ_Exported_Defines
55  * @{
56  */
57 /*Standard Feature Selector for clear feature command*/
58 #define FEATURE_SELECTOR_ENDPOINT 0X00
59 #define FEATURE_SELECTOR_DEVICE 0X01
60 
61 
62 #define INTERFACE_DESC_TYPE 0x04
63 #define ENDPOINT_DESC_TYPE 0x05
64 #define INTERFACE_DESC_SIZE 0x09
65 
66 
67 #define USBH_HID_CLASS 0x03
68 
69 /**
70  * @}
71  */
72 
73 
74 /** @defgroup USBH_STDREQ_Exported_Types
75  * @{
76  */
77 /**
78  * @}
79  */
80 
81 
82 /** @defgroup USBH_STDREQ_Exported_Macros
83  * @{
84  */
85 /**
86  * @}
87  */
88 
89 /** @defgroup USBH_STDREQ_Exported_Variables
90  * @{
91  */
92 extern uint8_t USBH_CfgDesc[512];
93 /**
94  * @}
95  */
96 
97 /** @defgroup USBH_STDREQ_Exported_FunctionsPrototype
98  * @{
99  */
100 USBH_Status USBH_GetDescriptor(USB_OTG_CORE_HANDLE *pdev,
101  USBH_HOST *phost,
102  uint8_t req_type,
103  uint16_t value_idx,
104  uint8_t* buff,
105  uint16_t length );
106 
107 USBH_Status USBH_Get_DevDesc(USB_OTG_CORE_HANDLE *pdev,
108  USBH_HOST *phost,
109  uint8_t length);
110 
111 USBH_Status USBH_Get_StringDesc(USB_OTG_CORE_HANDLE *pdev,
112  USBH_HOST *phost,
113  uint8_t string_index,
114  uint8_t *buff,
115  uint16_t length);
116 
117 USBH_Status USBH_SetCfg(USB_OTG_CORE_HANDLE *pdev,
118  USBH_HOST *phost,
119  uint16_t configuration_value);
120 
121 USBH_Status USBH_Get_CfgDesc(USB_OTG_CORE_HANDLE *pdev,
122  USBH_HOST *phost,
123  uint16_t length);
124 
125 USBH_Status USBH_SetAddress(USB_OTG_CORE_HANDLE *pdev,
126  USBH_HOST *phost,
127  uint8_t DeviceAddress);
128 
129 USBH_Status USBH_ClrFeature(USB_OTG_CORE_HANDLE *pdev,
130  USBH_HOST *phost,
131  uint8_t ep_num, uint8_t hc_num);
132 
133 USBH_Status USBH_SetInterface(USB_OTG_CORE_HANDLE *pdev,
134  USBH_HOST *phost,
135  uint8_t ep_num, uint8_t altSetting);
136 
137 USBH_Status USBH_Issue_ClrFeature(USB_OTG_CORE_HANDLE *pdev,
138  USBH_HOST *phost,
139  uint8_t ep_num);
140 
141 USBH_DescHeader_t *USBH_GetNextDesc (uint8_t *pbuf,
142  uint16_t *ptr);
143 /**
144  * @}
145  */
146 
147 #endif /* __USBH_STDREQ_H */
148 
149 /**
150  * @}
151  */
152 
153 /**
154  * @}
155  */
156 
157 /**
158 * @}
159 */
160 
161 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
162 #endif /* (USE_STM32_USB_HOST_MODE || USE_STM32_USB_USE_DEVICE_MODE || USE_STM32_USB_OTG_MODE) */
libheivs configuration file