1 /**
2   ******************************************************************************
3   * @file    usbh_ioreq.h
4   * @author  MCD Application Team
5   * @version V3.0.0
6   * @date    18-February-2014
7   * @brief   Header file for usbh_ioreq.c
8   ******************************************************************************
9   * @attention
10   *
11   * <h2><center>&copy; COPYRIGHT 2014 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_IOREQ_H
30 #define __USBH_IOREQ_H
31 
32 /* Includes ------------------------------------------------------------------*/
33 #include "usbh_conf.h"
34 #include "usbh_core.h"
35 /** @addtogroup USBH_LIB
36   * @{
37   */
38 
39 /** @addtogroup USBH_LIB_CORE
40 * @{
41 */
42 
43 /** @defgroup USBH_IOREQ
44   * @brief This file is the header file for usbh_ioreq.c
45   * @{
46   */
47 
48 
49 /** @defgroup USBH_IOREQ_Exported_Defines
50   * @{
51   */
52 
53 #define USBH_PID_SETUP                            0
54 #define USBH_PID_DATA                             1
55 
56 #define USBH_EP_CONTROL                           0
57 #define USBH_EP_ISO                               1
58 #define USBH_EP_BULK                              2
59 #define USBH_EP_INTERRUPT                         3
60 
61 #define USBH_SETUP_PKT_SIZE                       8
62 /**
63   * @}
64   */
65 
66 
67 /** @defgroup USBH_IOREQ_Exported_Types
68   * @{
69   */
70 /**
71   * @}
72   */
73 
74 
75 /** @defgroup USBH_IOREQ_Exported_Macros
76   * @{
77   */
78 /**
79   * @}
80   */
81 
82 /** @defgroup USBH_IOREQ_Exported_Variables
83   * @{
84   */
85 /**
86   * @}
87   */
88 
89 /** @defgroup USBH_IOREQ_Exported_FunctionsPrototype
90   * @{
91   */
92 USBH_StatusTypeDef USBH_CtlSendSetup (USBH_HandleTypeDef *phost,
93                                 uint8_t *buff,
94                                 uint8_t hc_num);
95 
96 USBH_StatusTypeDef USBH_CtlSendData (USBH_HandleTypeDef *phost,
97                                 uint8_t *buff,
98                                 uint16_t length,
99                                 uint8_t hc_num,
100                                 uint8_t do_ping );
101 
102 USBH_StatusTypeDef USBH_CtlReceiveData(USBH_HandleTypeDef *phost,
103                                 uint8_t *buff,
104                                 uint16_t length,
105                                 uint8_t hc_num);
106 
107 USBH_StatusTypeDef USBH_BulkReceiveData(USBH_HandleTypeDef *phost,
108                                 uint8_t *buff,
109                                 uint16_t length,
110                                 uint8_t hc_num);
111 
112 USBH_StatusTypeDef USBH_BulkSendData (USBH_HandleTypeDef *phost,
113                                 uint8_t *buff,
114                                 uint16_t length,
115                                 uint8_t hc_num,
116                                 uint8_t do_ping );
117 
118 USBH_StatusTypeDef USBH_InterruptReceiveData(USBH_HandleTypeDef *phost,
119                                        uint8_t             *buff,
120                                        uint8_t             length,
121                                        uint8_t             hc_num);
122 
123 USBH_StatusTypeDef USBH_InterruptSendData(USBH_HandleTypeDef *phost,
124                                     uint8_t *buff,
125                                     uint8_t length,
126                                     uint8_t hc_num);
127 
128 
129 USBH_StatusTypeDef USBH_IsocReceiveData(USBH_HandleTypeDef *phost,
130                                 uint8_t *buff,
131                                 uint32_t length,
132                                 uint8_t hc_num);
133 
134 
135 USBH_StatusTypeDef USBH_IsocSendData(USBH_HandleTypeDef *phost,
136                                 uint8_t *buff,
137                                 uint32_t length,
138                                 uint8_t hc_num);
139 /**
140   * @}
141   */
142 
143 #endif /* __USBH_IOREQ_H */
144 
145 /**
146   * @}
147   */
148 
149 /**
150   * @}
151   */
152 
153 /**
154 * @}
155 */
156 
157 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
158 
159 
160