annotate Common/Drivers/STM32F4xx_HAL_DRIVER_v120/Inc/stm32f4xx_hal_hcd.h @ 112:fdf0272e9213 FlipDisplay

Added new nvm parameter"FlipDisplay" indicating the screen orientation
author Ideenmodellierer
date Tue, 01 Jan 2019 21:03:33 +0100
parents 5f11787b4f42
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
38
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
1 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
2 ******************************************************************************
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
3 * @file stm32f4xx_hal_hcd.h
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
4 * @author MCD Application Team
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
5 * @version V1.2.0
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
6 * @date 26-December-2014
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
7 * @brief Header file of HCD HAL module.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
8 ******************************************************************************
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
9 * @attention
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
10 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
11 * <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
12 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
13 * Redistribution and use in source and binary forms, with or without modification,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
14 * are permitted provided that the following conditions are met:
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
15 * 1. Redistributions of source code must retain the above copyright notice,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
16 * this list of conditions and the following disclaimer.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
17 * 2. Redistributions in binary form must reproduce the above copyright notice,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
18 * this list of conditions and the following disclaimer in the documentation
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
19 * and/or other materials provided with the distribution.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
21 * may be used to endorse or promote products derived from this software
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
22 * without specific prior written permission.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
23 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
34 *
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
35 ******************************************************************************
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
36 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
37
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
38 /* Define to prevent recursive inclusion -------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
39 #ifndef __STM32F4xx_HAL_HCD_H
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
40 #define __STM32F4xx_HAL_HCD_H
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
41
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
42 #ifdef __cplusplus
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
43 extern "C" {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
44 #endif
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
45
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
46 /* Includes ------------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
47 #include "stm32f4xx_ll_usb.h"
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
48
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
49 /** @addtogroup STM32F4xx_HAL_Driver
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
50 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
51 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
52
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
53 /** @defgroup HCD HCD
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
54 * @brief HCD HAL module driver
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
55 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
56 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
57
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
58 /* Exported types ------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
59 /** @defgroup HCD_Exported_Types HCD Exported Types
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
60 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
61 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
62
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
63 /** @defgroup HCD_Exported_Types_Group1 HCD State Structure definition
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
64 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
65 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
66 typedef enum
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
67 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
68 HAL_HCD_STATE_RESET = 0x00,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
69 HAL_HCD_STATE_READY = 0x01,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
70 HAL_HCD_STATE_ERROR = 0x02,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
71 HAL_HCD_STATE_BUSY = 0x03,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
72 HAL_HCD_STATE_TIMEOUT = 0x04
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
73 } HCD_StateTypeDef;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
74
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
75 typedef USB_OTG_GlobalTypeDef HCD_TypeDef;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
76 typedef USB_OTG_CfgTypeDef HCD_InitTypeDef;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
77 typedef USB_OTG_HCTypeDef HCD_HCTypeDef ;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
78 typedef USB_OTG_URBStateTypeDef HCD_URBStateTypeDef ;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
79 typedef USB_OTG_HCStateTypeDef HCD_HCStateTypeDef ;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
80 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
81 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
82 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
83
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
84 /** @defgroup HCD_Exported_Types_Group2 HCD Handle Structure definition
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
85 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
86 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
87 typedef struct
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
88 {
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
89 HCD_TypeDef *Instance; /*!< Register base address */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
90 HCD_InitTypeDef Init; /*!< HCD required parameters */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
91 HCD_HCTypeDef hc[15]; /*!< Host channels parameters */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
92 HAL_LockTypeDef Lock; /*!< HCD peripheral status */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
93 __IO HCD_StateTypeDef State; /*!< HCD communication state */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
94 void *pData; /*!< Pointer Stack Handler */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
95 } HCD_HandleTypeDef;
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
96 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
97 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
98 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
99
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
100 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
101 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
102 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
103
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
104 /* Exported constants --------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
105 /** @defgroup HCD_Exported_Constants HCD Exported Constants
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
106 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
107 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
108 /** @defgroup HCD_Speed HCD Speed
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
109 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
110 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
111 #define HCD_SPEED_HIGH 0
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
112 #define HCD_SPEED_LOW 2
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
113 #define HCD_SPEED_FULL 3
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
114 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
115 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
116 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
117
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
118 /** @defgroup HCD_PHY_Module HCD PHY Module
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
119 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
120 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
121 #define HCD_PHY_ULPI 1
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
122 #define HCD_PHY_EMBEDDED 2
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
123 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
124 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
125 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
126
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
127 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
128 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
129 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
130
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
131 /* Exported macro ------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
132 /** @defgroup HCD_Exported_Macros HCD Exported Macros
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
133 * @brief macros to handle interrupts and specific clock configurations
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
134 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
135 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
136 #define __HAL_HCD_ENABLE(__HANDLE__) USB_EnableGlobalInt ((__HANDLE__)->Instance)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
137 #define __HAL_HCD_DISABLE(__HANDLE__) USB_DisableGlobalInt ((__HANDLE__)->Instance)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
138
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
139 #define __HAL_HCD_GET_FLAG(__HANDLE__, __INTERRUPT__) ((USB_ReadInterrupts((__HANDLE__)->Instance) & (__INTERRUPT__)) == (__INTERRUPT__))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
140 #define __HAL_HCD_CLEAR_FLAG(__HANDLE__, __INTERRUPT__) (((__HANDLE__)->Instance->GINTSTS) = (__INTERRUPT__))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
141 #define __HAL_HCD_IS_INVALID_INTERRUPT(__HANDLE__) (USB_ReadInterrupts((__HANDLE__)->Instance) == 0)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
142
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
143 #define __HAL_HCD_CLEAR_HC_INT(chnum, __INTERRUPT__) (USBx_HC(chnum)->HCINT = (__INTERRUPT__))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
144 #define __HAL_HCD_MASK_HALT_HC_INT(chnum) (USBx_HC(chnum)->HCINTMSK &= ~USB_OTG_HCINTMSK_CHHM)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
145 #define __HAL_HCD_UNMASK_HALT_HC_INT(chnum) (USBx_HC(chnum)->HCINTMSK |= USB_OTG_HCINTMSK_CHHM)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
146 #define __HAL_HCD_MASK_ACK_HC_INT(chnum) (USBx_HC(chnum)->HCINTMSK &= ~USB_OTG_HCINTMSK_ACKM)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
147 #define __HAL_HCD_UNMASK_ACK_HC_INT(chnum) (USBx_HC(chnum)->HCINTMSK |= USB_OTG_HCINTMSK_ACKM)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
148 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
149 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
150 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
151
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
152 /* Exported functions --------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
153 /** @defgroup HCD_Exported_Functions HCD Exported Functions
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
154 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
155 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
156
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
157 /** @defgroup HCD_Exported_Functions_Group1 Initialization and de-initialization functions
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
158 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
159 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
160 HAL_StatusTypeDef HAL_HCD_Init(HCD_HandleTypeDef *hhcd);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
161 HAL_StatusTypeDef HAL_HCD_DeInit(HCD_HandleTypeDef *hhcd);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
162 HAL_StatusTypeDef HAL_HCD_HC_Init(HCD_HandleTypeDef *hhcd,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
163 uint8_t ch_num,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
164 uint8_t epnum,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
165 uint8_t dev_address,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
166 uint8_t speed,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
167 uint8_t ep_type,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
168 uint16_t mps);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
169
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
170 HAL_StatusTypeDef HAL_HCD_HC_Halt(HCD_HandleTypeDef *hhcd, uint8_t ch_num);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
171 void HAL_HCD_MspInit(HCD_HandleTypeDef *hhcd);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
172 void HAL_HCD_MspDeInit(HCD_HandleTypeDef *hhcd);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
173 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
174 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
175 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
176
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
177 /** @defgroup HCD_Exported_Functions_Group2 IO operation functions
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
178 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
179 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
180 HAL_StatusTypeDef HAL_HCD_HC_SubmitRequest(HCD_HandleTypeDef *hhcd,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
181 uint8_t pipe,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
182 uint8_t direction,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
183 uint8_t ep_type,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
184 uint8_t token,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
185 uint8_t* pbuff,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
186 uint16_t length,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
187 uint8_t do_ping);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
188
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
189 /* Non-Blocking mode: Interrupt */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
190 void HAL_HCD_IRQHandler(HCD_HandleTypeDef *hhcd);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
191 void HAL_HCD_SOF_Callback(HCD_HandleTypeDef *hhcd);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
192 void HAL_HCD_Connect_Callback(HCD_HandleTypeDef *hhcd);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
193 void HAL_HCD_Disconnect_Callback(HCD_HandleTypeDef *hhcd);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
194 void HAL_HCD_HC_NotifyURBChange_Callback(HCD_HandleTypeDef *hhcd,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
195 uint8_t chnum,
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
196 HCD_URBStateTypeDef urb_state);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
197 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
198 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
199 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
200
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
201 /** @defgroup HCD_Exported_Functions_Group3 Peripheral Control functions
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
202 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
203 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
204 HAL_StatusTypeDef HAL_HCD_ResetPort(HCD_HandleTypeDef *hhcd);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
205 HAL_StatusTypeDef HAL_HCD_Start(HCD_HandleTypeDef *hhcd);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
206 HAL_StatusTypeDef HAL_HCD_Stop(HCD_HandleTypeDef *hhcd);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
207 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
208 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
209 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
210
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
211 /** @defgroup HCD_Exported_Functions_Group4 Peripheral State functions
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
212 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
213 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
214 HCD_StateTypeDef HAL_HCD_GetState(HCD_HandleTypeDef *hhcd);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
215 HCD_URBStateTypeDef HAL_HCD_HC_GetURBState(HCD_HandleTypeDef *hhcd, uint8_t chnum);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
216 uint32_t HAL_HCD_HC_GetXferCount(HCD_HandleTypeDef *hhcd, uint8_t chnum);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
217 HCD_HCStateTypeDef HAL_HCD_HC_GetState(HCD_HandleTypeDef *hhcd, uint8_t chnum);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
218 uint32_t HAL_HCD_GetCurrentFrame(HCD_HandleTypeDef *hhcd);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
219 uint32_t HAL_HCD_GetCurrentSpeed(HCD_HandleTypeDef *hhcd);
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
220 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
221 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
222 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
223
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
224 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
225 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
226 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
227
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
228 /* Private macros ------------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
229 /** @defgroup HCD_Private_Macros HCD Private Macros
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
230 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
231 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
232 /** @defgroup HCD_Instance_definition HCD Instance definition
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
233 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
234 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
235 #if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx) || defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
236 #define IS_HCD_ALL_INSTANCE(INSTANCE) (((INSTANCE) == USB_OTG_FS) || \
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
237 ((INSTANCE) == USB_OTG_HS))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
238 #elif defined(STM32F401xC) || defined(STM32F401xE) || defined(STM32F411xE)
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
239 #define IS_HCD_ALL_INSTANCE(INSTANCE) (((INSTANCE) == USB_OTG_FS))
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
240 #endif
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
241 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
242 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
243 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
244
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
245 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
246 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
247 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
248
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
249 /* Private functions prototypes ----------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
250 /** @defgroup HCD_Private_Functions_Prototypes HCD Private Functions Prototypes
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
251 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
252 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
253
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
254 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
255 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
256 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
257
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
258 /* Private functions ---------------------------------------------------------*/
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
259 /** @defgroup HCD_Private_Functions HCD Private Functions
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
260 * @{
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
261 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
262
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
263 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
264 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
265 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
266
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
267 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
268 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
269 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
270
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
271 /**
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
272 * @}
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
273 */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
274
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
275 #ifdef __cplusplus
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
276 }
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
277 #endif
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
278
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
279 #endif /* __STM32F4xx_HAL_HCD_H */
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
280
5f11787b4f42 include in ostc4 repository
heinrichsweikamp
parents:
diff changeset
281 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/