Merge pull request #93 from zyp/master
[fw/stlink] / example / stm32f4 / STM32_USB_HOST_Library / Core / inc / usbh_hcs.h
1 /**
2   ******************************************************************************
3   * @file    usbh_hcs.h
4   * @author  MCD Application Team
5   * @version V2.0.0
6   * @date    22-July-2011
7   * @brief   Header file for usbh_hcs.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_HCS_H
24 #define __USBH_HCS_H
25
26 /* Includes ------------------------------------------------------------------*/
27 #include "usbh_core.h"
28
29
30
31 /** @addtogroup USBH_LIB
32   * @{
33   */
34
35 /** @addtogroup USBH_LIB_CORE
36 * @{
37 */
38   
39 /** @defgroup USBH_HCS
40   * @brief This file is the header file for usbh_hcs.c
41   * @{
42   */ 
43
44 /** @defgroup USBH_HCS_Exported_Defines
45   * @{
46   */
47 #define HC_MAX           8
48
49 #define HC_OK            0x0000
50 #define HC_USED          0x8000
51 #define HC_ERROR         0xFFFF
52 #define HC_USED_MASK     0x7FFF
53 /**
54   * @}
55   */ 
56
57 /** @defgroup USBH_HCS_Exported_Types
58   * @{
59   */ 
60 /**
61   * @}
62   */ 
63
64
65 /** @defgroup USBH_HCS_Exported_Macros
66   * @{
67   */ 
68 /**
69   * @}
70   */ 
71
72 /** @defgroup USBH_HCS_Exported_Variables
73   * @{
74   */ 
75 /**
76   * @}
77   */ 
78
79 /** @defgroup USBH_HCS_Exported_FunctionsPrototype
80   * @{
81   */
82
83 uint8_t USBH_Alloc_Channel(USB_OTG_CORE_HANDLE *pdev, uint8_t ep_addr);
84
85 uint8_t USBH_Free_Channel  (USB_OTG_CORE_HANDLE *pdev, uint8_t idx);
86
87 uint8_t USBH_DeAllocate_AllChannel  (USB_OTG_CORE_HANDLE *pdev);
88
89 uint8_t USBH_Open_Channel  (USB_OTG_CORE_HANDLE *pdev,
90                             uint8_t ch_num,
91                             uint8_t dev_address,
92                             uint8_t speed,
93                             uint8_t ep_type,
94                             uint16_t mps);
95
96 uint8_t USBH_Modify_Channel (USB_OTG_CORE_HANDLE *pdev,
97                             uint8_t hc_num,
98                             uint8_t dev_address,
99                             uint8_t speed,
100                             uint8_t ep_type,
101                             uint16_t mps);
102 /**
103   * @}
104   */ 
105
106
107
108 #endif /* __USBH_HCS_H */
109
110
111 /**
112   * @}
113   */ 
114
115 /**
116   * @}
117   */ 
118
119 /**
120 * @}
121 */ 
122
123 /******************* (C) COPYRIGHT 2011 STMicroelectronics *****END OF FILE****/
124
125