1 /** 2 ****************************************************************************** 3 * @file usbh_ioreq.h 4 * @author MCD Application Team 5 * @brief Header file for usbh_ioreq.c 6 ****************************************************************************** 7 * @attention 8 * 9 * <h2><center>© Copyright (c) 2015 STMicroelectronics. 10 * All rights reserved.</center></h2> 11 * 12 * This software component is licensed by ST under Ultimate Liberty license 13 * SLA0044, the "License"; You may not use this file except in compliance with 14 * the License. You may obtain a copy of the License at: 15 * www.st.com/SLA0044 16 * 17 ****************************************************************************** 18 */ 19 20 /* Define to prevent recursive ----------------------------------------------*/ 21 #ifndef __USBH_IOREQ_H 22 #define __USBH_IOREQ_H 23 24 #ifdef __cplusplus 25 extern "C" { 26 #endif 27 28 /* Includes ------------------------------------------------------------------*/ 29 #include "usbh_conf.h" 30 #include "usbh_core.h" 31 32 /** @addtogroup USBH_LIB 33 * @{ 34 */ 35 36 /** @addtogroup USBH_LIB_CORE 37 * @{ 38 */ 39 40 /** @defgroup USBH_IOREQ 41 * @brief This file is the header file for usbh_ioreq.c 42 * @{ 43 */ 44 45 46 /** @defgroup USBH_IOREQ_Exported_Defines 47 * @{ 48 */ 49 50 #define USBH_PID_SETUP 0U 51 #define USBH_PID_DATA 1U 52 53 #define USBH_EP_CONTROL 0U 54 #define USBH_EP_ISO 1U 55 #define USBH_EP_BULK 2U 56 #define USBH_EP_INTERRUPT 3U 57 58 #define USBH_SETUP_PKT_SIZE 8U 59 /** 60 * @} 61 */ 62 63 64 /** @defgroup USBH_IOREQ_Exported_Types 65 * @{ 66 */ 67 /** 68 * @} 69 */ 70 71 72 /** @defgroup USBH_IOREQ_Exported_Macros 73 * @{ 74 */ 75 /** 76 * @} 77 */ 78 79 /** @defgroup USBH_IOREQ_Exported_Variables 80 * @{ 81 */ 82 /** 83 * @} 84 */ 85 86 /** @defgroup USBH_IOREQ_Exported_FunctionsPrototype 87 * @{ 88 */ 89 USBH_StatusTypeDef USBH_CtlSendSetup(USBH_HandleTypeDef *phost, 90 uint8_t *buff, 91 uint8_t pipe_num); 92 93 USBH_StatusTypeDef USBH_CtlSendData(USBH_HandleTypeDef *phost, 94 uint8_t *buff, 95 uint16_t length, 96 uint8_t pipe_num, 97 uint8_t do_ping); 98 99 USBH_StatusTypeDef USBH_CtlReceiveData(USBH_HandleTypeDef *phost, 100 uint8_t *buff, 101 uint16_t length, 102 uint8_t pipe_num); 103 104 USBH_StatusTypeDef USBH_BulkReceiveData(USBH_HandleTypeDef *phost, 105 uint8_t *buff, 106 uint16_t length, 107 uint8_t pipe_num); 108 109 USBH_StatusTypeDef USBH_BulkSendData(USBH_HandleTypeDef *phost, 110 uint8_t *buff, 111 uint16_t length, 112 uint8_t pipe_num, 113 uint8_t do_ping); 114 115 USBH_StatusTypeDef USBH_InterruptReceiveData(USBH_HandleTypeDef *phost, 116 uint8_t *buff, 117 uint8_t length, 118 uint8_t pipe_num); 119 120 USBH_StatusTypeDef USBH_InterruptSendData(USBH_HandleTypeDef *phost, 121 uint8_t *buff, 122 uint8_t length, 123 uint8_t pipe_num); 124 125 126 USBH_StatusTypeDef USBH_IsocReceiveData(USBH_HandleTypeDef *phost, 127 uint8_t *buff, 128 uint32_t length, 129 uint8_t pipe_num); 130 131 132 USBH_StatusTypeDef USBH_IsocSendData(USBH_HandleTypeDef *phost, 133 uint8_t *buff, 134 uint32_t length, 135 uint8_t pipe_num); 136 /** 137 * @} 138 */ 139 140 #ifdef __cplusplus 141 } 142 #endif 143 144 #endif /* __USBH_IOREQ_H */ 145 146 /** 147 * @} 148 */ 149 150 /** 151 * @} 152 */ 153 154 /** 155 * @} 156 */ 157 158 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ 159 160 161