Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: BSP_DISCO_F746NG_patch mbed-rtos mbed
usbh_core.h
00001 /** 00002 ****************************************************************************** 00003 * @file usbh_core.h 00004 * @author MCD Application Team 00005 * @version V3.2.2 00006 * @date 07-July-2015 00007 * @brief Header file for usbh_core.c 00008 ****************************************************************************** 00009 * @attention 00010 * 00011 * <h2><center>© 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_CORE_H 00030 #define __USBH_CORE_H 00031 00032 #ifdef __cplusplus 00033 extern "C" { 00034 #endif 00035 00036 /* Includes ------------------------------------------------------------------*/ 00037 #include "usbh_conf.h" 00038 #include "usbh_def.h" 00039 #include "usbh_ioreq.h" 00040 #include "usbh_pipes.h" 00041 #include "usbh_ctlreq.h" 00042 00043 /** @addtogroup USBH_LIB 00044 * @{ 00045 */ 00046 00047 /** @addtogroup USBH_LIB_CORE 00048 * @{ 00049 */ 00050 00051 /** @defgroup USBH_CORE 00052 * @brief This file is the Header file for usbh_core.c 00053 * @{ 00054 */ 00055 00056 00057 /** @defgroup USBH_CORE_Exported_Defines 00058 * @{ 00059 */ 00060 00061 /** 00062 * @} 00063 */ 00064 #define HOST_USER_SELECT_CONFIGURATION 1 00065 #define HOST_USER_CLASS_ACTIVE 2 00066 #define HOST_USER_CLASS_SELECTED 3 00067 #define HOST_USER_CONNECTION 4 00068 #define HOST_USER_DISCONNECTION 5 00069 #define HOST_USER_UNRECOVERED_ERROR 6 00070 00071 00072 /** 00073 * @} 00074 */ 00075 00076 00077 00078 /** @defgroup USBH_CORE_Exported_Macros 00079 * @{ 00080 */ 00081 00082 /** 00083 * @} 00084 */ 00085 00086 /** @defgroup USBH_CORE_Exported_Variables 00087 * @{ 00088 */ 00089 00090 /** 00091 * @} 00092 */ 00093 00094 /** @defgroup USBH_CORE_Exported_FunctionsPrototype 00095 * @{ 00096 */ 00097 00098 00099 USBH_StatusTypeDef USBH_Init(USBH_HandleTypeDef *phost, void (*pUsrFunc)(USBH_HandleTypeDef *phost, uint8_t ), uint8_t id); 00100 USBH_StatusTypeDef USBH_DeInit(USBH_HandleTypeDef *phost); 00101 USBH_StatusTypeDef USBH_RegisterClass(USBH_HandleTypeDef *phost, USBH_ClassTypeDef *pclass); 00102 USBH_StatusTypeDef USBH_SelectInterface(USBH_HandleTypeDef *phost, uint8_t interface); 00103 uint8_t USBH_FindInterface(USBH_HandleTypeDef *phost, 00104 uint8_t Class, 00105 uint8_t SubClass, 00106 uint8_t Protocol); 00107 uint8_t USBH_GetActiveClass(USBH_HandleTypeDef *phost); 00108 00109 uint8_t USBH_FindInterfaceIndex(USBH_HandleTypeDef *phost, 00110 uint8_t interface_number, 00111 uint8_t alt_settings); 00112 00113 USBH_StatusTypeDef USBH_Start (USBH_HandleTypeDef *phost); 00114 USBH_StatusTypeDef USBH_Stop (USBH_HandleTypeDef *phost); 00115 USBH_StatusTypeDef USBH_Process (USBH_HandleTypeDef *phost); 00116 USBH_StatusTypeDef USBH_ReEnumerate (USBH_HandleTypeDef *phost); 00117 00118 /* USBH Low Level Driver */ 00119 USBH_StatusTypeDef USBH_LL_Init (USBH_HandleTypeDef *phost); 00120 USBH_StatusTypeDef USBH_LL_DeInit (USBH_HandleTypeDef *phost); 00121 USBH_StatusTypeDef USBH_LL_Start (USBH_HandleTypeDef *phost); 00122 USBH_StatusTypeDef USBH_LL_Stop (USBH_HandleTypeDef *phost); 00123 00124 USBH_StatusTypeDef USBH_LL_Connect (USBH_HandleTypeDef *phost); 00125 USBH_StatusTypeDef USBH_LL_Disconnect (USBH_HandleTypeDef *phost); 00126 USBH_SpeedTypeDef USBH_LL_GetSpeed (USBH_HandleTypeDef *phost); 00127 USBH_StatusTypeDef USBH_LL_ResetPort (USBH_HandleTypeDef *phost); 00128 uint32_t USBH_LL_GetLastXferSize (USBH_HandleTypeDef *phost, uint8_t ); 00129 USBH_StatusTypeDef USBH_LL_DriverVBUS (USBH_HandleTypeDef *phost, uint8_t ); 00130 00131 USBH_StatusTypeDef USBH_LL_OpenPipe (USBH_HandleTypeDef *phost, uint8_t, uint8_t, uint8_t, uint8_t , uint8_t, uint16_t ); 00132 USBH_StatusTypeDef USBH_LL_ClosePipe (USBH_HandleTypeDef *phost, uint8_t ); 00133 USBH_StatusTypeDef USBH_LL_SubmitURB (USBH_HandleTypeDef *phost, uint8_t, uint8_t,uint8_t, uint8_t, uint8_t*, uint16_t, uint8_t ); 00134 USBH_URBStateTypeDef USBH_LL_GetURBState (USBH_HandleTypeDef *phost, uint8_t ); 00135 #if (USBH_USE_OS == 1) 00136 USBH_StatusTypeDef USBH_LL_NotifyURBChange (USBH_HandleTypeDef *phost); 00137 #endif 00138 USBH_StatusTypeDef USBH_LL_SetToggle (USBH_HandleTypeDef *phost, uint8_t , uint8_t ); 00139 uint8_t USBH_LL_GetToggle (USBH_HandleTypeDef *phost, uint8_t ); 00140 00141 /* USBH Time base */ 00142 void USBH_Delay (uint32_t Delay); 00143 void USBH_LL_SetTimer (USBH_HandleTypeDef *phost, uint32_t ); 00144 void USBH_LL_IncTimer (USBH_HandleTypeDef *phost); 00145 /** 00146 * @} 00147 */ 00148 00149 #ifdef __cplusplus 00150 } 00151 #endif 00152 00153 #endif /* __USBH_CORE_H */ 00154 /** 00155 * @} 00156 */ 00157 00158 /** 00159 * @} 00160 */ 00161 00162 /** 00163 * @} 00164 */ 00165 00166 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 00167 00168 00169
Generated on Tue Jul 12 2022 14:58:21 by
1.7.2