4bdd43698a0a79809b9c2d21a79d9499b55479f7
[fw/stlink] / example / stm32f4 / STM32_USB_HOST_Library / Core / inc / usbh_ioreq.h
1 /**
2   ******************************************************************************
3   * @file    usbh_ioreq.h
4   * @author  MCD Application Team
5   * @version V2.0.0
6   * @date    22-July-2011
7   * @brief   Header file for usbh_ioreq.c
8   ******************************************************************************
9   * @attention
10   *
11   * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
12   * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
13   * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
14   * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
15   * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
16   * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
17   *
18   * <h2><center>&copy; COPYRIGHT 2011 STMicroelectronics</center></h2>
19   ******************************************************************************
20   */ 
21
22 /* Define to prevent recursive  ----------------------------------------------*/
23 #ifndef __USBH_IOREQ_H
24 #define __USBH_IOREQ_H
25
26 /* Includes ------------------------------------------------------------------*/
27 #include "usb_conf.h"
28 #include "usbh_core.h"
29 #include "usbh_def.h"
30
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 #define USBH_SETUP_PKT_SIZE   8
50 #define USBH_EP0_EP_NUM       0
51 #define USBH_MAX_PACKET_SIZE  0x40
52 /**
53   * @}
54   */ 
55
56
57 /** @defgroup USBH_IOREQ_Exported_Types
58   * @{
59   */ 
60 /**
61   * @}
62   */ 
63
64
65 /** @defgroup USBH_IOREQ_Exported_Macros
66   * @{
67   */ 
68 /**
69   * @}
70   */ 
71
72 /** @defgroup USBH_IOREQ_Exported_Variables
73   * @{
74   */ 
75 /**
76   * @}
77   */ 
78
79 /** @defgroup USBH_IOREQ_Exported_FunctionsPrototype
80   * @{
81   */
82 USBH_Status USBH_CtlSendSetup ( USB_OTG_CORE_HANDLE *pdev, 
83                                 uint8_t *buff, 
84                                 uint8_t hc_num);
85
86 USBH_Status USBH_CtlSendData ( USB_OTG_CORE_HANDLE *pdev, 
87                                 uint8_t *buff, 
88                                 uint8_t length,
89                                 uint8_t hc_num);
90
91 USBH_Status USBH_CtlReceiveData( USB_OTG_CORE_HANDLE *pdev, 
92                                 uint8_t *buff, 
93                                 uint8_t length,
94                                 uint8_t hc_num);
95
96 USBH_Status USBH_BulkReceiveData( USB_OTG_CORE_HANDLE *pdev, 
97                                 uint8_t *buff, 
98                                 uint16_t length,
99                                 uint8_t hc_num);
100
101 USBH_Status USBH_BulkSendData ( USB_OTG_CORE_HANDLE *pdev, 
102                                 uint8_t *buff, 
103                                 uint16_t length,
104                                 uint8_t hc_num);
105
106 USBH_Status USBH_InterruptReceiveData( USB_OTG_CORE_HANDLE *pdev, 
107                                        uint8_t             *buff, 
108                                        uint8_t             length,
109                                        uint8_t             hc_num);
110
111 USBH_Status USBH_InterruptSendData( USB_OTG_CORE_HANDLE *pdev, 
112                                     uint8_t *buff, 
113                                     uint8_t length,
114                                     uint8_t hc_num);
115
116 USBH_Status USBH_CtlReq (USB_OTG_CORE_HANDLE *pdev,
117                          USBH_HOST *phost, 
118                          uint8_t             *buff,
119                          uint16_t            length);
120 /**
121   * @}
122   */ 
123
124 #endif /* __USBH_IOREQ_H */
125
126 /**
127   * @}
128   */ 
129
130 /**
131   * @}
132   */
133
134 /**
135 * @}
136 */ 
137
138 /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
139
140