discoverpixy
usbh_stdreq.h
Go to the documentation of this file.
1 
22 /* Define to prevent recursive ----------------------------------------------*/
23 #ifndef __USBH_STDREQ_H
24 #define __USBH_STDREQ_H
25 
26 /* Includes ------------------------------------------------------------------*/
27 
28 #include "usb_conf.h"
29 #include "usb_hcd.h"
30 #include "usbh_core.h"
31 #include "usbh_def.h"
32 
50 /*Standard Feature Selector for clear feature command*/
51 #define FEATURE_SELECTOR_ENDPOINT 0X00
52 #define FEATURE_SELECTOR_DEVICE 0X01
53 
54 
55 #define INTERFACE_DESC_TYPE 0x04
56 #define ENDPOINT_DESC_TYPE 0x05
57 #define INTERFACE_DESC_SIZE 0x09
58 
59 
60 #define USBH_HID_CLASS 0x03
61 
92 USBH_Status USBH_GetDescriptor(USB_OTG_CORE_HANDLE *pdev,
93  USBH_HOST *phost,
94  uint8_t req_type,
95  uint16_t value_idx,
96  uint8_t* buff,
97  uint16_t length );
98 
99 USBH_Status USBH_Get_DevDesc(USB_OTG_CORE_HANDLE *pdev,
100  USBH_HOST *phost,
101  uint8_t length);
102 
103 USBH_Status USBH_Get_StringDesc(USB_OTG_CORE_HANDLE *pdev,
104  USBH_HOST *phost,
105  uint8_t string_index,
106  uint8_t *buff,
107  uint16_t length);
108 
109 USBH_Status USBH_SetCfg(USB_OTG_CORE_HANDLE *pdev,
110  USBH_HOST *phost,
111  uint16_t configuration_value);
112 
113 USBH_Status USBH_Get_CfgDesc(USB_OTG_CORE_HANDLE *pdev,
114  USBH_HOST *phost,
115  uint16_t length);
116 
117 USBH_Status USBH_SetAddress(USB_OTG_CORE_HANDLE *pdev,
118  USBH_HOST *phost,
119  uint8_t DeviceAddress);
120 
121 USBH_Status USBH_ClrFeature(USB_OTG_CORE_HANDLE *pdev,
122  USBH_HOST *phost,
123  uint8_t ep_num, uint8_t hc_num);
124 
125 USBH_Status USBH_Issue_ClrFeature(USB_OTG_CORE_HANDLE *pdev,
126  USBH_HOST *phost,
127  uint8_t ep_num);
132 #endif /* __USBH_STDREQ_H */
133 
146 /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
147 
148 
USBH_Status USBH_SetAddress(USB_OTG_CORE_HANDLE *pdev, USBH_HOST *phost, uint8_t DeviceAddress)
USBH_SetAddress This command sets the address to the connected device.
Definition: usbh_stdreq.c:240
Header file for usbh_core.c.
Host layer Header file.
Definition: usb_core.h:287
USBH_Status USBH_Get_StringDesc(USB_OTG_CORE_HANDLE *pdev, USBH_HOST *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_stdreq.c:178
USBH_Status USBH_Get_DevDesc(USB_OTG_CORE_HANDLE *pdev, USBH_HOST *phost, uint8_t length)
USBH_Get_DevDesc Issue Get Device Descriptor command to the device. Once the response received...
Definition: usbh_stdreq.c:110
USBH_Status USBH_Get_CfgDesc(USB_OTG_CORE_HANDLE *pdev, USBH_HOST *phost, uint16_t length)
USBH_Get_CfgDesc Issues Configuration Descriptor to the device. Once the response received...
Definition: usbh_stdreq.c:142
USBH_Status USBH_ClrFeature(USB_OTG_CORE_HANDLE *pdev, USBH_HOST *phost, uint8_t ep_num, uint8_t hc_num)
USBH_ClrFeature This request is used to clear or disable a specific feature.
Definition: usbh_stdreq.c:287
USBH_Status USBH_GetDescriptor(USB_OTG_CORE_HANDLE *pdev, USBH_HOST *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, it parses the descriptor and updates the status.
Definition: usbh_stdreq.c:210
Definition: usbh_core.h:215
USBH_Status USBH_SetCfg(USB_OTG_CORE_HANDLE *pdev, USBH_HOST *phost, uint16_t configuration_value)
USBH_SetCfg The command sets the configuration value to the connected device.
Definition: usbh_stdreq.c:263
Definitions used in the USB host library.