Prusa MINI Firmware overview
usbh_def.h
Go to the documentation of this file.
1 /**
2  ******************************************************************************
3  * @file usbh_def.h
4  * @author MCD Application Team
5  * @version V3.2.2
6  * @date 07-July-2015
7  * @brief Definitions used in the USB host library
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_DEF_H
30 #define USBH_DEF_H
31 
32 #ifdef __cplusplus
33  extern "C" {
34 #endif
35 
36 /* Includes ------------------------------------------------------------------*/
37 #include "usbh_conf.h"
38 
39 /** @addtogroup USBH_LIB
40  * @{
41  */
42 
43 /** @addtogroup USBH_LIB_CORE
44 * @{
45 */
46 
47 /** @defgroup USBH_DEF
48  * @brief This file is includes USB descriptors
49  * @{
50  */
51 
52 #ifndef NULL
53 #define NULL 0
54 #endif
55 
56 #ifndef FALSE
57 #define FALSE 0
58 #endif
59 
60 #ifndef TRUE
61 #define TRUE 1
62 #endif
63 
64 
65 #define ValBit(VAR,POS) (VAR & (1 << POS))
66 #define SetBit(VAR,POS) (VAR |= (1 << POS))
67 #define ClrBit(VAR,POS) (VAR &= ((1 << POS)^255))
68 
69 #define LE16(addr) (((uint16_t)(*((uint8_t *)(addr))))\
70  + (((uint16_t)(*(((uint8_t *)(addr)) + 1))) << 8))
71 
72 #define LE16S(addr) (uint16_t)(LE16((addr)))
73 
74 #define LE32(addr) ((((uint32_t)(*(((uint8_t *)(addr)) + 0))) + \
75  (((uint32_t)(*(((uint8_t *)(addr)) + 1))) << 8) + \
76  (((uint32_t)(*(((uint8_t *)(addr)) + 2))) << 16) + \
77  (((uint32_t)(*(((uint8_t *)(addr)) + 3))) << 24)))
78 
79 #define LE64(addr) ((((uint64_t)(*(((uint8_t *)(addr)) + 0))) + \
80  (((uint64_t)(*(((uint8_t *)(addr)) + 1))) << 8) +\
81  (((uint64_t)(*(((uint8_t *)(addr)) + 2))) << 16) +\
82  (((uint64_t)(*(((uint8_t *)(addr)) + 3))) << 24) +\
83  (((uint64_t)(*(((uint8_t *)(addr)) + 4))) << 32) +\
84  (((uint64_t)(*(((uint8_t *)(addr)) + 5))) << 40) +\
85  (((uint64_t)(*(((uint8_t *)(addr)) + 6))) << 48) +\
86  (((uint64_t)(*(((uint8_t *)(addr)) + 7))) << 56)))
87 
88 
89 #define LE24(addr) ((((uint32_t)(*(((uint8_t *)(addr)) + 0))) + \
90  (((uint32_t)(*(((uint8_t *)(addr)) + 1))) << 8) + \
91  (((uint32_t)(*(((uint8_t *)(addr)) + 2))) << 16)))
92 
93 
94 #define LE32S(addr) (int32_t)(LE32((addr)))
95 
96 
97 
98 #define USB_LEN_DESC_HDR 0x02
99 #define USB_LEN_DEV_DESC 0x12
100 #define USB_LEN_CFG_DESC 0x09
101 #define USB_LEN_IF_DESC 0x09
102 #define USB_LEN_EP_DESC 0x07
103 #define USB_LEN_OTG_DESC 0x03
104 #define USB_LEN_SETUP_PKT 0x08
105 
106 /* bmRequestType :D7 Data Phase Transfer Direction */
107 #define USB_REQ_DIR_MASK 0x80
108 #define USB_H2D 0x00
109 #define USB_D2H 0x80
110 
111 /* bmRequestType D6..5 Type */
112 #define USB_REQ_TYPE_STANDARD 0x00
113 #define USB_REQ_TYPE_CLASS 0x20
114 #define USB_REQ_TYPE_VENDOR 0x40
115 #define USB_REQ_TYPE_RESERVED 0x60
116 
117 /* bmRequestType D4..0 Recipient */
118 #define USB_REQ_RECIPIENT_DEVICE 0x00
119 #define USB_REQ_RECIPIENT_INTERFACE 0x01
120 #define USB_REQ_RECIPIENT_ENDPOINT 0x02
121 #define USB_REQ_RECIPIENT_OTHER 0x03
122 
123 /* Table 9-4. Standard Request Codes */
124 /* bRequest , Value */
125 #define USB_REQ_GET_STATUS 0x00
126 #define USB_REQ_CLEAR_FEATURE 0x01
127 #define USB_REQ_SET_FEATURE 0x03
128 #define USB_REQ_SET_ADDRESS 0x05
129 #define USB_REQ_GET_DESCRIPTOR 0x06
130 #define USB_REQ_SET_DESCRIPTOR 0x07
131 #define USB_REQ_GET_CONFIGURATION 0x08
132 #define USB_REQ_SET_CONFIGURATION 0x09
133 #define USB_REQ_GET_INTERFACE 0x0A
134 #define USB_REQ_SET_INTERFACE 0x0B
135 #define USB_REQ_SYNCH_FRAME 0x0C
136 
137 /* Table 9-5. Descriptor Types of USB Specifications */
138 #define USB_DESC_TYPE_DEVICE 1
139 #define USB_DESC_TYPE_CONFIGURATION 2
140 #define USB_DESC_TYPE_STRING 3
141 #define USB_DESC_TYPE_INTERFACE 4
142 #define USB_DESC_TYPE_ENDPOINT 5
143 #define USB_DESC_TYPE_DEVICE_QUALIFIER 6
144 #define USB_DESC_TYPE_OTHER_SPEED_CONFIGURATION 7
145 #define USB_DESC_TYPE_INTERFACE_POWER 8
146 #define USB_DESC_TYPE_HID 0x21
147 #define USB_DESC_TYPE_HID_REPORT 0x22
148 
149 
150 #define USB_DEVICE_DESC_SIZE 18
151 #define USB_CONFIGURATION_DESC_SIZE 9
152 #define USB_HID_DESC_SIZE 9
153 #define USB_INTERFACE_DESC_SIZE 9
154 #define USB_ENDPOINT_DESC_SIZE 7
155 
156 /* Descriptor Type and Descriptor Index */
157 /* Use the following values when calling the function USBH_GetDescriptor */
158 #define USB_DESC_DEVICE ((USB_DESC_TYPE_DEVICE << 8) & 0xFF00)
159 #define USB_DESC_CONFIGURATION ((USB_DESC_TYPE_CONFIGURATION << 8) & 0xFF00)
160 #define USB_DESC_STRING ((USB_DESC_TYPE_STRING << 8) & 0xFF00)
161 #define USB_DESC_INTERFACE ((USB_DESC_TYPE_INTERFACE << 8) & 0xFF00)
162 #define USB_DESC_ENDPOINT ((USB_DESC_TYPE_INTERFACE << 8) & 0xFF00)
163 #define USB_DESC_DEVICE_QUALIFIER ((USB_DESC_TYPE_DEVICE_QUALIFIER << 8) & 0xFF00)
164 #define USB_DESC_OTHER_SPEED_CONFIGURATION ((USB_DESC_TYPE_OTHER_SPEED_CONFIGURATION << 8) & 0xFF00)
165 #define USB_DESC_INTERFACE_POWER ((USB_DESC_TYPE_INTERFACE_POWER << 8) & 0xFF00)
166 #define USB_DESC_HID_REPORT ((USB_DESC_TYPE_HID_REPORT << 8) & 0xFF00)
167 #define USB_DESC_HID ((USB_DESC_TYPE_HID << 8) & 0xFF00)
168 
169 
170 #define USB_EP_TYPE_CTRL 0x00
171 #define USB_EP_TYPE_ISOC 0x01
172 #define USB_EP_TYPE_BULK 0x02
173 #define USB_EP_TYPE_INTR 0x03
174 
175 #define USB_EP_DIR_OUT 0x00
176 #define USB_EP_DIR_IN 0x80
177 #define USB_EP_DIR_MSK 0x80
178 
179 #ifndef USBH_MAX_PIPES_NBR
180  #define USBH_MAX_PIPES_NBR 15
181 #endif /* USBH_MAX_PIPES_NBR */
182 
183 #define USBH_DEVICE_ADDRESS_DEFAULT 0
184 #define USBH_MAX_ERROR_COUNT 2
185 #define USBH_DEVICE_ADDRESS 1
186 
187 
188 /**
189  * @}
190  */
191 
192 
193 #define USBH_CONFIGURATION_DESCRIPTOR_SIZE (USB_CONFIGURATION_DESC_SIZE \
194  + USB_INTERFACE_DESC_SIZE\
195  + (USBH_MAX_NUM_ENDPOINTS * USB_ENDPOINT_DESC_SIZE))
196 
197 
198 #define CONFIG_DESC_wTOTAL_LENGTH (ConfigurationDescriptorData.ConfigDescfield.\
199  ConfigurationDescriptor.wTotalLength)
200 
201 
202 typedef union
203 {
204  uint16_t w;
205  struct BW
206  {
209  }
210  bw;
211 }
213 
214 
215 typedef union _USB_Setup
216 {
217  uint32_t d8[2];
218 
220  {
226  } b;
227 }
229 
230 typedef struct _DescHeader
231 {
234 }
236 
237 typedef struct _DeviceDescriptor
238 {
241  uint16_t bcdUSB; /* USB Specification Number which device complies too */
245  /* If equal to Zero, each interface specifies its own class
246  code if equal to 0xFF, the class code is vendor specified.
247  Otherwise field is valid Class Code.*/
249  uint16_t idVendor; /* Vendor ID (Assigned by USB Org) */
250  uint16_t idProduct; /* Product ID (Assigned by Manufacturer) */
251  uint16_t bcdDevice; /* Device Release Number */
252  uint8_t iManufacturer; /* Index of Manufacturer String Descriptor */
253  uint8_t iProduct; /* Index of Product String Descriptor */
254  uint8_t iSerialNumber; /* Index of Serial Number String Descriptor */
255  uint8_t bNumConfigurations; /* Number of Possible Configurations */
256 }
258 
259 typedef struct _EndpointDescriptor
260 {
263  uint8_t bEndpointAddress; /* indicates what endpoint this descriptor is describing */
264  uint8_t bmAttributes; /* specifies the transfer type. */
265  uint16_t wMaxPacketSize; /* Maximum Packet Size this endpoint is capable of sending or receiving */
266  uint8_t bInterval; /* is used to specify the polling interval of certain transfers. */
267 }
269 
270 typedef struct _InterfaceDescriptor
271 {
275  uint8_t bAlternateSetting; /* Value used to select alternative setting */
276  uint8_t bNumEndpoints; /* Number of Endpoints used for this interface */
277  uint8_t bInterfaceClass; /* Class Code (Assigned by USB Org) */
278  uint8_t bInterfaceSubClass; /* Subclass Code (Assigned by USB Org) */
279  uint8_t bInterfaceProtocol; /* Protocol Code */
280  uint8_t iInterface; /* Index of String Descriptor Describing this interface */
282 }
284 
285 
287 {
290  uint16_t wTotalLength; /* Total Length of Data Returned */
291  uint8_t bNumInterfaces; /* Number of Interfaces */
292  uint8_t bConfigurationValue; /* Value to use as an argument to select this configuration*/
293  uint8_t iConfiguration; /*Index of String Descriptor Describing this configuration */
294  uint8_t bmAttributes; /* D7 Bus Powered , D6 Self Powered, D5 Remote Wakeup , D4..0 Reserved (0)*/
295  uint8_t bMaxPower; /*Maximum Power Consumption */
297 }
299 
300 
301 /* Following USB Host status */
302 typedef enum
303 {
304  USBH_OK = 0,
311 
312 
313 /** @defgroup USBH_CORE_Exported_Types
314  * @{
315  */
316 
317 typedef enum
318 {
322 
324 
325 /* Following states are used for gState */
326 typedef enum
327 {
342 
343 /* Following states are used for EnumerationState */
344 typedef enum
345 {
355 
356 /* Following states are used for CtrlXferStateMachine */
357 typedef enum
358 {
374 
375 
376 /* Following states are used for RequestState */
377 typedef enum
378 {
383 
384 typedef enum {
392 
393 typedef enum
394 {
400 }
402 
403 /* Control request structure */
404 typedef struct
405 {
410  uint16_t length;
411  uint16_t timer;
415 
417 
418 /* Attached device structure */
419 typedef struct
420 {
421 #if (USBH_KEEP_CFG_DESCRIPTOR == 1)
423 #endif
431 
433 
434 struct _USBH_HandleTypeDef;
435 
436 /* USB Host Class structure */
437 typedef struct
438 {
439  const char *Name;
441  USBH_StatusTypeDef (*Init) (struct _USBH_HandleTypeDef *phost);
442  USBH_StatusTypeDef (*DeInit) (struct _USBH_HandleTypeDef *phost);
443  USBH_StatusTypeDef (*Requests) (struct _USBH_HandleTypeDef *phost);
444  USBH_StatusTypeDef (*BgndProcess) (struct _USBH_HandleTypeDef *phost);
445  USBH_StatusTypeDef (*SOFProcess) (struct _USBH_HandleTypeDef *phost);
446  void* pData;
448 
449 /* USB Host handle structure */
450 typedef struct _USBH_HandleTypeDef
451 {
452  __IO HOST_StateTypeDef gState; /* Host State Machine Value */
453  ENUM_StateTypeDef EnumState; /* Enumeration state Machine */
459  uint32_t ClassNumber;
460  uint32_t Pipes[15];
461  __IO uint32_t Timer;
463  void* pData;
464  void (* pUser )(struct _USBH_HandleTypeDef *pHandle, uint8_t id);
465 
466 #if (USBH_USE_OS == 1)
467  osMessageQId os_event;
468  osThreadId thread;
469 #endif
470 
472 
473 
474 #if defined ( __GNUC__ )
475  #ifndef __weak
476  #define __weak __attribute__((weak))
477  #endif /* __weak */
478  #ifndef __packed
479  #define __packed __attribute__((__packed__))
480  #endif /* __packed */
481 #endif /* __GNUC__ */
482 
483 #ifdef __cplusplus
484 }
485 #endif
486 
487 #endif /* USBH_DEF_H */
488 
489 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
CMD_WAIT
Definition: usbh_def.h:381
USBH_URB_ERROR
Definition: usbh_def.h:389
USBH_OSEventTypeDef
USBH_OSEventTypeDef
Definition: usbh_def.h:393
usbh_conf.h
: Header for usbh_conf.c file.
_DeviceDescriptor::idVendor
uint16_t idVendor
Definition: usbh_def.h:249
USBH_CtrlTypeDef::setup
USB_Setup_TypeDef setup
Definition: usbh_def.h:412
USBH_HandleTypeDef
struct _USBH_HandleTypeDef USBH_HandleTypeDef
HOST_CHECK_CLASS
Definition: usbh_def.h:337
CTRL_DATA_IN
Definition: usbh_def.h:362
USBH_CtrlTypeDef::buff
uint8_t * buff
Definition: usbh_def.h:409
CTRL_STALLED
Definition: usbh_def.h:371
_DeviceDescriptor::bDeviceClass
uint8_t bDeviceClass
Definition: usbh_def.h:242
CTRL_STATUS_IN_WAIT
Definition: usbh_def.h:367
_ConfigurationDescriptor::bLength
uint8_t bLength
Definition: usbh_def.h:288
USBH_UNRECOVERED_ERROR
Definition: usbh_def.h:308
_InterfaceDescriptor::bNumEndpoints
uint8_t bNumEndpoints
Definition: usbh_def.h:276
ENUM_SET_ADDR
Definition: usbh_def.h:348
CTRL_DATA_OUT_WAIT
Definition: usbh_def.h:365
USBH_CLASS_EVENT
Definition: usbh_def.h:398
USBH_DeviceTypeDef::current_interface
uint8_t current_interface
Definition: usbh_def.h:428
osThreadId
TaskHandle_t osThreadId
Definition: cmsis_os.h:283
USBH_URB_NOTREADY
Definition: usbh_def.h:387
_ConfigurationDescriptor::Itf_Desc
USBH_InterfaceDescTypeDef Itf_Desc[USBH_MAX_NUM_INTERFACES]
Definition: usbh_def.h:296
_USB_Setup::_SetupPkt_Struc::bRequest
uint8_t bRequest
Definition: usbh_def.h:222
USBH_DeviceTypeDef
Definition: usbh_def.h:419
_USB_Setup
Definition: usbh_def.h:215
_InterfaceDescriptor::Ep_Desc
USBH_EpDescTypeDef Ep_Desc[USBH_MAX_NUM_ENDPOINTS]
Definition: usbh_def.h:281
HOST_StateTypeDef
HOST_StateTypeDef
Definition: usbh_def.h:326
USB_Setup_TypeDef
union _USB_Setup USB_Setup_TypeDef
_USBH_HandleTypeDef::RequestState
CMD_StateTypeDef RequestState
Definition: usbh_def.h:454
HOST_SUSPENDED
Definition: usbh_def.h:339
HOST_INPUT
Definition: usbh_def.h:335
CMD_StateTypeDef
CMD_StateTypeDef
Definition: usbh_def.h:377
USBH_DeviceTypeDef::DevDesc
USBH_DevDescTypeDef DevDesc
Definition: usbh_def.h:429
_InterfaceDescriptor::bInterfaceNumber
uint8_t bInterfaceNumber
Definition: usbh_def.h:274
ENUM_GET_FULL_CFG_DESC
Definition: usbh_def.h:350
_USB_Setup::_SetupPkt_Struc::wIndex
uint16_t_uint8_t wIndex
Definition: usbh_def.h:224
USBH_URB_DONE
Definition: usbh_def.h:386
USBH_CtrlTypeDef::length
uint16_t length
Definition: usbh_def.h:410
_ConfigurationDescriptor::bConfigurationValue
uint8_t bConfigurationValue
Definition: usbh_def.h:292
HOST_DEV_DISCONNECTED
Definition: usbh_def.h:331
HOST_CLASS_REQUEST
Definition: usbh_def.h:334
_DeviceDescriptor::bcdDevice
uint16_t bcdDevice
Definition: usbh_def.h:251
_DeviceDescriptor::bcdUSB
uint16_t bcdUSB
Definition: usbh_def.h:241
_DeviceDescriptor::bDeviceProtocol
uint8_t bDeviceProtocol
Definition: usbh_def.h:244
_USBH_HandleTypeDef::Timer
__IO uint32_t Timer
Definition: usbh_def.h:461
CTRL_DATA_IN_WAIT
Definition: usbh_def.h:363
_DeviceDescriptor::iManufacturer
uint8_t iManufacturer
Definition: usbh_def.h:252
_USBH_HandleTypeDef
Definition: usbh_def.h:450
HOST_ENUMERATION
Definition: usbh_def.h:333
_DescHeader
Definition: usbh_def.h:230
USBH_ClassTypeDef::pData
void * pData
Definition: usbh_def.h:446
USBH_URB_NYET
Definition: usbh_def.h:388
_USBH_HandleTypeDef::Control
USBH_CtrlTypeDef Control
Definition: usbh_def.h:455
USBH_URB_IDLE
Definition: usbh_def.h:385
osMessageQId
QueueHandle_t osMessageQId
Definition: cmsis_os.h:303
_USB_Setup::_SetupPkt_Struc::wValue
uint16_t_uint8_t wValue
Definition: usbh_def.h:223
_InterfaceDescriptor
Definition: usbh_def.h:270
USBH_DeviceTypeDef::address
uint8_t address
Definition: usbh_def.h:425
USBH_SPEED_FULL
Definition: usbh_def.h:320
_USBH_HandleTypeDef::id
uint8_t id
Definition: usbh_def.h:462
HOST_DEV_ATTACHED
Definition: usbh_def.h:330
HOST_IDLE
Definition: usbh_def.h:328
USBH_MAX_SIZE_CONFIGURATION
#define USBH_MAX_SIZE_CONFIGURATION
Definition: usbh_conf.h:114
HOST_DEV_WAIT_FOR_ATTACHMENT
Definition: usbh_def.h:329
USBH_EpDescTypeDef
struct _EndpointDescriptor USBH_EpDescTypeDef
CTRL_DATA_OUT
Definition: usbh_def.h:364
_EndpointDescriptor
Definition: usbh_def.h:259
HOST_ABORT_STATE
Definition: usbh_def.h:340
CMD_IDLE
Definition: usbh_def.h:379
USBH_DeviceTypeDef::CfgDesc
USBH_CfgDescTypeDef CfgDesc
Definition: usbh_def.h:430
USBH_SPEED_LOW
Definition: usbh_def.h:321
_DeviceDescriptor::bNumConfigurations
uint8_t bNumConfigurations
Definition: usbh_def.h:255
_ConfigurationDescriptor::bDescriptorType
uint8_t bDescriptorType
Definition: usbh_def.h:289
USBH_ERROR_SPEED_UNKNOWN
Definition: usbh_def.h:309
ENUM_IDLE
Definition: usbh_def.h:346
CMD_SEND
Definition: usbh_def.h:380
_USB_Setup::_SetupPkt_Struc::wLength
uint16_t_uint8_t wLength
Definition: usbh_def.h:225
uint16_t_uint8_t::BW::lsb
uint8_t lsb
Definition: usbh_def.h:208
USBH_URB_EVENT
Definition: usbh_def.h:396
USBH_InterfaceDescTypeDef
struct _InterfaceDescriptor USBH_InterfaceDescTypeDef
ENUM_GET_MFC_STRING_DESC
Definition: usbh_def.h:351
ENUM_GET_SERIALNUM_STRING_DESC
Definition: usbh_def.h:353
USBH_ClassTypeDef::ClassCode
uint8_t ClassCode
Definition: usbh_def.h:440
CTRL_COMPLETE
Definition: usbh_def.h:372
USBH_MAX_NUM_SUPPORTED_CLASS
#define USBH_MAX_NUM_SUPPORTED_CLASS
Definition: usbh_conf.h:111
USBH_OK
Definition: usbh_def.h:304
USBH_STATE_CHANGED_EVENT
Definition: usbh_def.h:399
CTRL_STATUS_OUT
Definition: usbh_def.h:368
void
void
Definition: png.h:1083
_ConfigurationDescriptor
Definition: usbh_def.h:286
ENUM_StateTypeDef
ENUM_StateTypeDef
Definition: usbh_def.h:344
ENUM_GET_FULL_DEV_DESC
Definition: usbh_def.h:347
_USBH_HandleTypeDef::device
USBH_DeviceTypeDef device
Definition: usbh_def.h:456
USBH_DeviceTypeDef::speed
uint8_t speed
Definition: usbh_def.h:426
CTRL_SETUP_WAIT
Definition: usbh_def.h:361
USBH_CONTROL_EVENT
Definition: usbh_def.h:397
USBH_DeviceTypeDef::is_connected
__IO uint8_t is_connected
Definition: usbh_def.h:427
USBH_CtrlTypeDef::state
CTRL_StateTypeDef state
Definition: usbh_def.h:413
uint16_t_uint8_t::BW::msb
uint8_t msb
Definition: usbh_def.h:207
USBH_CtrlTypeDef::pipe_size
uint8_t pipe_size
Definition: usbh_def.h:408
_USBH_HandleTypeDef::Pipes
uint32_t Pipes[15]
Definition: usbh_def.h:460
ENUM_GET_PRODUCT_STRING_DESC
Definition: usbh_def.h:352
_EndpointDescriptor::bmAttributes
uint8_t bmAttributes
Definition: usbh_def.h:264
_DeviceDescriptor::iProduct
uint8_t iProduct
Definition: usbh_def.h:253
USBH_DevDescTypeDef
struct _DeviceDescriptor USBH_DevDescTypeDef
USBH_CtrlTypeDef
Definition: usbh_def.h:404
USBH_SPEED_HIGH
Definition: usbh_def.h:319
_DeviceDescriptor
Definition: usbh_def.h:237
_DeviceDescriptor::bMaxPacketSize
uint8_t bMaxPacketSize
Definition: usbh_def.h:248
USBH_URB_STALL
Definition: usbh_def.h:390
_ConfigurationDescriptor::bNumInterfaces
uint8_t bNumInterfaces
Definition: usbh_def.h:291
_DeviceDescriptor::bLength
uint8_t bLength
Definition: usbh_def.h:239
USBH_CtrlTypeDef::pipe_in
uint8_t pipe_in
Definition: usbh_def.h:406
_ConfigurationDescriptor::iConfiguration
uint8_t iConfiguration
Definition: usbh_def.h:293
uint8_t
const uint8_t[]
Definition: 404_html.c:3
CTRL_STATUS_IN
Definition: usbh_def.h:366
USBH_MAX_NUM_ENDPOINTS
#define USBH_MAX_NUM_ENDPOINTS
Definition: usbh_conf.h:99
USBH_CfgDescTypeDef
struct _ConfigurationDescriptor USBH_CfgDescTypeDef
_EndpointDescriptor::bDescriptorType
uint8_t bDescriptorType
Definition: usbh_def.h:262
_USB_Setup::b
struct _USB_Setup::_SetupPkt_Struc b
CTRL_StateTypeDef
CTRL_StateTypeDef
Definition: usbh_def.h:357
USBH_StatusTypeDef
USBH_StatusTypeDef
Definition: usbh_def.h:302
_DeviceDescriptor::idProduct
uint16_t idProduct
Definition: usbh_def.h:250
CTRL_SETUP
Definition: usbh_def.h:360
_USBH_HandleTypeDef::EnumState
ENUM_StateTypeDef EnumState
Definition: usbh_def.h:453
USBH_DescHeader_t
struct _DescHeader USBH_DescHeader_t
_ConfigurationDescriptor::bMaxPower
uint8_t bMaxPower
Definition: usbh_def.h:295
uint16_t_uint8_t
Definition: usbh_def.h:202
_InterfaceDescriptor::bInterfaceProtocol
uint8_t bInterfaceProtocol
Definition: usbh_def.h:279
_InterfaceDescriptor::bInterfaceSubClass
uint8_t bInterfaceSubClass
Definition: usbh_def.h:278
_DeviceDescriptor::bDeviceSubClass
uint8_t bDeviceSubClass
Definition: usbh_def.h:243
_USBH_HandleTypeDef::pClass
USBH_ClassTypeDef * pClass[USBH_MAX_NUM_SUPPORTED_CLASS]
Definition: usbh_def.h:457
USBH_CtrlTypeDef::timer
uint16_t timer
Definition: usbh_def.h:411
USBH_CtrlTypeDef::errorcount
uint8_t errorcount
Definition: usbh_def.h:414
HOST_DETECT_DEVICE_SPEED
Definition: usbh_def.h:332
_DescHeader::bLength
uint8_t bLength
Definition: usbh_def.h:232
_USBH_HandleTypeDef::ClassNumber
uint32_t ClassNumber
Definition: usbh_def.h:459
USBH_CtrlTypeDef::pipe_out
uint8_t pipe_out
Definition: usbh_def.h:407
_InterfaceDescriptor::iInterface
uint8_t iInterface
Definition: usbh_def.h:280
_USBH_HandleTypeDef::pData
void * pData
Definition: usbh_def.h:463
CTRL_IDLE
Definition: usbh_def.h:359
uint16_t_uint8_t::w
uint16_t w
Definition: usbh_def.h:204
USBH_SpeedTypeDef
USBH_SpeedTypeDef
Definition: usbh_def.h:317
_DeviceDescriptor::iSerialNumber
uint8_t iSerialNumber
Definition: usbh_def.h:254
USBH_MAX_DATA_BUFFER
#define USBH_MAX_DATA_BUFFER
Definition: usbh_conf.h:117
USBH_FAIL
Definition: usbh_def.h:306
USBH_BUSY
Definition: usbh_def.h:305
_ConfigurationDescriptor::wTotalLength
uint16_t wTotalLength
Definition: usbh_def.h:290
uint16_t_uint8_t::BW
Definition: usbh_def.h:205
_DescHeader::bDescriptorType
uint8_t bDescriptorType
Definition: usbh_def.h:233
_USB_Setup::_SetupPkt_Struc
Definition: usbh_def.h:219
_EndpointDescriptor::bInterval
uint8_t bInterval
Definition: usbh_def.h:266
_USBH_HandleTypeDef::pUser
void(* pUser)(struct _USBH_HandleTypeDef *pHandle, uint8_t id)
Definition: usbh_def.h:464
USBH_ClassTypeDef::Name
const char * Name
Definition: usbh_def.h:439
USBH_MAX_NUM_INTERFACES
#define USBH_MAX_NUM_INTERFACES
Definition: usbh_conf.h:102
_InterfaceDescriptor::bDescriptorType
uint8_t bDescriptorType
Definition: usbh_def.h:273
USBH_URBStateTypeDef
USBH_URBStateTypeDef
Definition: usbh_def.h:384
_USB_Setup::_SetupPkt_Struc::bmRequestType
uint8_t bmRequestType
Definition: usbh_def.h:221
_EndpointDescriptor::bLength
uint8_t bLength
Definition: usbh_def.h:261
_USBH_HandleTypeDef::pActiveClass
USBH_ClassTypeDef * pActiveClass
Definition: usbh_def.h:458
_ConfigurationDescriptor::bmAttributes
uint8_t bmAttributes
Definition: usbh_def.h:294
_USBH_HandleTypeDef::gState
__IO HOST_StateTypeDef gState
Definition: usbh_def.h:452
USBH_PORT_EVENT
Definition: usbh_def.h:395
_DeviceDescriptor::bDescriptorType
uint8_t bDescriptorType
Definition: usbh_def.h:240
_InterfaceDescriptor::bAlternateSetting
uint8_t bAlternateSetting
Definition: usbh_def.h:275
HOST_CLASS
Definition: usbh_def.h:338
_EndpointDescriptor::wMaxPacketSize
uint16_t wMaxPacketSize
Definition: usbh_def.h:265
ENUM_GET_CFG_DESC
Definition: usbh_def.h:349
_EndpointDescriptor::bEndpointAddress
uint8_t bEndpointAddress
Definition: usbh_def.h:263
HOST_SET_CONFIGURATION
Definition: usbh_def.h:336
USBH_NOT_SUPPORTED
Definition: usbh_def.h:307
_USB_Setup::d8
uint32_t d8[2]
Definition: usbh_def.h:217
_InterfaceDescriptor::bLength
uint8_t bLength
Definition: usbh_def.h:272
_InterfaceDescriptor::bInterfaceClass
uint8_t bInterfaceClass
Definition: usbh_def.h:277
CTRL_STATUS_OUT_WAIT
Definition: usbh_def.h:369
USBH_ClassTypeDef
Definition: usbh_def.h:437
CTRL_ERROR
Definition: usbh_def.h:370