Nirvana Jay / Mbed 2 deprecated F7DISCO_Demo

Dependencies:   BSP_DISCO_F746NG_patch mbed-rtos mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers usbh_ctlreq.h Source File

usbh_ctlreq.h

Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   * @file    usbh_ctlreq.h
00004   * @author  MCD Application Team
00005   * @version V3.2.2
00006   * @date    07-July-2015
00007   * @brief   Header file for usbh_ctlreq.c
00008   ******************************************************************************
00009   * @attention
00010   *
00011   * <h2><center>&copy; COPYRIGHT 2015 STMicroelectronics</center></h2>
00012   *
00013   * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
00014   * You may not use this file except in compliance with the License.
00015   * You may obtain a copy of the License at:
00016   *
00017   *        http://www.st.com/software_license_agreement_liberty_v2
00018   *
00019   * Unless required by applicable law or agreed to in writing, software 
00020   * distributed under the License is distributed on an "AS IS" BASIS, 
00021   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00022   * See the License for the specific language governing permissions and
00023   * limitations under the License.
00024   *
00025   ******************************************************************************
00026   */ 
00027 
00028 /* Define to prevent recursive  ----------------------------------------------*/
00029 #ifndef __USBH_CTLREQ_H
00030 #define __USBH_CTLREQ_H
00031 
00032 #ifdef __cplusplus
00033  extern "C" {
00034 #endif
00035 
00036 /* Includes ------------------------------------------------------------------*/
00037 #include "usbh_core.h"
00038 
00039 /** @addtogroup USBH_LIB
00040   * @{
00041   */
00042 
00043 /** @addtogroup USBH_LIB_CORE
00044 * @{
00045 */
00046   
00047 /** @defgroup USBH_CTLREQ
00048   * @brief This file is the 
00049   * @{
00050   */ 
00051 
00052 
00053 /** @defgroup USBH_CTLREQ_Exported_Defines
00054   * @{
00055   */
00056 /*Standard Feature Selector for clear feature command*/
00057 #define FEATURE_SELECTOR_ENDPOINT         0X00
00058 #define FEATURE_SELECTOR_DEVICE           0X01
00059 
00060 
00061 #define INTERFACE_DESC_TYPE               0x04
00062 #define ENDPOINT_DESC_TYPE                0x05
00063 #define INTERFACE_DESC_SIZE               0x09
00064 
00065 /**
00066   * @}
00067   */ 
00068 
00069 
00070 /** @defgroup USBH_CTLREQ_Exported_Types
00071   * @{
00072   */ 
00073 /**
00074   * @}
00075   */ 
00076 
00077 
00078 /** @defgroup USBH_CTLREQ_Exported_Macros
00079   * @{
00080   */ 
00081 /**
00082   * @}
00083   */ 
00084 
00085 /** @defgroup USBH_CTLREQ_Exported_Variables
00086   * @{
00087   */ 
00088 extern uint8_t USBH_CfgDesc[512];
00089 /**
00090   * @}
00091   */ 
00092 
00093 /** @defgroup USBH_CTLREQ_Exported_FunctionsPrototype
00094   * @{
00095   */
00096 USBH_StatusTypeDef USBH_CtlReq     (USBH_HandleTypeDef *phost, 
00097                              uint8_t             *buff,
00098                              uint16_t            length);
00099 
00100 USBH_StatusTypeDef USBH_GetDescriptor(USBH_HandleTypeDef *phost,                                
00101                                uint8_t  req_type,
00102                                uint16_t value_idx, 
00103                                uint8_t* buff, 
00104                                uint16_t length );
00105 
00106 USBH_StatusTypeDef USBH_Get_DevDesc(USBH_HandleTypeDef *phost,
00107                              uint8_t length);
00108 
00109 USBH_StatusTypeDef USBH_Get_StringDesc(USBH_HandleTypeDef *phost,                              
00110                                 uint8_t string_index, 
00111                                 uint8_t *buff, 
00112                                 uint16_t length);
00113 
00114 USBH_StatusTypeDef USBH_SetCfg(USBH_HandleTypeDef *phost, 
00115                         uint16_t configuration_value);
00116 
00117 USBH_StatusTypeDef USBH_Get_CfgDesc(USBH_HandleTypeDef *phost,                              
00118                              uint16_t length);
00119 
00120 USBH_StatusTypeDef USBH_SetAddress(USBH_HandleTypeDef *phost,                          
00121                             uint8_t DeviceAddress);
00122 
00123 USBH_StatusTypeDef USBH_SetInterface(USBH_HandleTypeDef *phost, 
00124                         uint8_t ep_num, uint8_t altSetting);
00125 
00126 USBH_StatusTypeDef USBH_ClrFeature(USBH_HandleTypeDef *phost, 
00127                                    uint8_t ep_num);
00128 
00129 USBH_DescHeader_t      *USBH_GetNextDesc (uint8_t   *pbuf, 
00130                                                   uint16_t  *ptr);
00131 /**
00132   * @}
00133   */ 
00134 
00135 #ifdef __cplusplus
00136 }
00137 #endif
00138 
00139 #endif /* __USBH_CTLREQ_H */
00140 
00141 /**
00142   * @}
00143   */ 
00144 
00145 /**
00146   * @}
00147   */ 
00148 
00149 /**
00150 * @}
00151 */ 
00152 
00153 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
00154 
00155