Prusa MINI Firmware overview
usbh_ctlreq.h
Go to the documentation of this file.
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
10  *
11  * <h2><center>&copy; COPYRIGHT 2015 STMicroelectronics</center></h2>
12  *
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:
16  *
17  * http://www.st.com/software_license_agreement_liberty_v2
18  *
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.
24  *
25  ******************************************************************************
26  */
27 
28 /* Define to prevent recursive ----------------------------------------------*/
29 #ifndef __USBH_CTLREQ_H
30 #define __USBH_CTLREQ_H
31 
32 #ifdef __cplusplus
33  extern "C" {
34 #endif
35 
36 /* Includes ------------------------------------------------------------------*/
37 #include "usbh_core.h"
38 
39 /** @addtogroup USBH_LIB
40  * @{
41  */
42 
43 /** @addtogroup USBH_LIB_CORE
44 * @{
45 */
46 
47 /** @defgroup USBH_CTLREQ
48  * @brief This file is the
49  * @{
50  */
51 
52 
53 /** @defgroup USBH_CTLREQ_Exported_Defines
54  * @{
55  */
56 /*Standard Feature Selector for clear feature command*/
57 #define FEATURE_SELECTOR_ENDPOINT 0X00
58 #define FEATURE_SELECTOR_DEVICE 0X01
59 
60 
61 #define INTERFACE_DESC_TYPE 0x04
62 #define ENDPOINT_DESC_TYPE 0x05
63 #define INTERFACE_DESC_SIZE 0x09
64 
65 /**
66  * @}
67  */
68 
69 
70 /** @defgroup USBH_CTLREQ_Exported_Types
71  * @{
72  */
73 /**
74  * @}
75  */
76 
77 
78 /** @defgroup USBH_CTLREQ_Exported_Macros
79  * @{
80  */
81 /**
82  * @}
83  */
84 
85 /** @defgroup USBH_CTLREQ_Exported_Variables
86  * @{
87  */
88 extern uint8_t USBH_CfgDesc[512];
89 /**
90  * @}
91  */
92 
93 /** @defgroup USBH_CTLREQ_Exported_FunctionsPrototype
94  * @{
95  */
97  uint8_t *buff,
98  uint16_t length);
99 
101  uint8_t req_type,
102  uint16_t value_idx,
103  uint8_t* buff,
104  uint16_t length );
105 
107  uint8_t length);
108 
110  uint8_t string_index,
111  uint8_t *buff,
112  uint16_t length);
113 
115  uint16_t configuration_value);
116 
118  uint16_t length);
119 
121  uint8_t DeviceAddress);
122 
124  uint8_t ep_num, uint8_t altSetting);
125 
127  uint8_t ep_num);
128 
130  uint16_t *ptr);
131 /**
132  * @}
133  */
134 
135 #ifdef __cplusplus
136 }
137 #endif
138 
139 #endif /* __USBH_CTLREQ_H */
140 
141 /**
142  * @}
143  */
144 
145 /**
146  * @}
147  */
148 
149 /**
150 * @}
151 */
152 
153 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
USBH_GetDescriptor
USBH_StatusTypeDef USBH_GetDescriptor(USBH_HandleTypeDef *phost, uint8_t req_type, uint16_t value_idx, uint8_t *buff, uint16_t length)
USBH_GetDescriptor Issues Descriptor command to the device. Once the response received,...
Definition: usbh_ctlreq.c:204
USBH_CfgDesc
uint8_t USBH_CfgDesc[512]
USBH_SetCfg
USBH_StatusTypeDef USBH_SetCfg(USBH_HandleTypeDef *phost, uint16_t configuration_value)
USBH_SetCfg The command sets the configuration value to the connected device.
Definition: usbh_ctlreq.c:260
USBH_SetInterface
USBH_StatusTypeDef USBH_SetInterface(USBH_HandleTypeDef *phost, uint8_t ep_num, uint8_t altSetting)
USBH_SetInterface The command sets the Interface value to the connected device.
Definition: usbh_ctlreq.c:283
usbh_core.h
Header file for usbh_core.c.
USBH_Get_CfgDesc
USBH_StatusTypeDef USBH_Get_CfgDesc(USBH_HandleTypeDef *phost, uint16_t length)
USBH_Get_CfgDesc Issues Configuration Descriptor to the device. Once the response received,...
Definition: usbh_ctlreq.c:137
USBH_CtlReq
USBH_StatusTypeDef USBH_CtlReq(USBH_HandleTypeDef *phost, uint8_t *buff, uint16_t length)
USBH_CtlReq USBH_CtlReq sends a control request and provide the status after completion of the reques...
Definition: usbh_ctlreq.c:531
USBH_ClrFeature
USBH_StatusTypeDef USBH_ClrFeature(USBH_HandleTypeDef *phost, uint8_t ep_num)
USBH_ClrFeature This request is used to clear or disable a specific feature.
Definition: usbh_ctlreq.c:308
USBH_SetAddress
USBH_StatusTypeDef USBH_SetAddress(USBH_HandleTypeDef *phost, uint8_t DeviceAddress)
USBH_SetAddress This command sets the address to the connected device.
Definition: usbh_ctlreq.c:236
USBH_Get_StringDesc
USBH_StatusTypeDef USBH_Get_StringDesc(USBH_HandleTypeDef *phost, uint8_t string_index, uint8_t *buff, uint16_t length)
USBH_Get_StringDesc Issues string Descriptor command to the device. Once the response received,...
Definition: usbh_ctlreq.c:175
_USBH_HandleTypeDef
Definition: usbh_def.h:450
_DescHeader
Definition: usbh_def.h:230
USBH_Get_DevDesc
USBH_StatusTypeDef USBH_Get_DevDesc(USBH_HandleTypeDef *phost, uint8_t length)
USBH_Get_DevDesc Issue Get Device Descriptor command to the device. Once the response received,...
Definition: usbh_ctlreq.c:112
uint8_t
const uint8_t[]
Definition: 404_html.c:3
USBH_GetNextDesc
USBH_DescHeader_t * USBH_GetNextDesc(uint8_t *pbuf, uint16_t *ptr)
USBH_GetNextDesc This function return the next descriptor header.
Definition: usbh_ctlreq.c:509
USBH_StatusTypeDef
USBH_StatusTypeDef
Definition: usbh_def.h:302
length
png_uint_32 length
Definition: png.c:2247
pbuf
Definition: pbuf.h:142