mbed library sources

Dependents:   frdm_kl05z_gpio_test

Fork of mbed-src by mbed official

Committer:
mbed_official
Date:
Thu Aug 21 15:00:08 2014 +0100
Revision:
296:ec1b66a3d094
Parent:
targets/cmsis/TARGET_STM/TARGET_DISCO_F407VG/stm32f4xx_hal_pcd.h@242:7074e42da0b2
Synchronized with git revision bbc120c4786e99dfa586e7a13f8638064f1e5938

Full URL: https://github.com/mbedmicro/mbed/commit/bbc120c4786e99dfa586e7a13f8638064f1e5938/

DISCO_F407VG - add USBDevice support and a variant - ARCH_MAX

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 133:d4dda5c437f0 1 /**
mbed_official 133:d4dda5c437f0 2 ******************************************************************************
mbed_official 133:d4dda5c437f0 3 * @file stm32f4xx_hal_pcd.h
mbed_official 133:d4dda5c437f0 4 * @author MCD Application Team
mbed_official 242:7074e42da0b2 5 * @version V1.1.0RC2
mbed_official 242:7074e42da0b2 6 * @date 14-May-2014
mbed_official 133:d4dda5c437f0 7 * @brief Header file of PCD HAL module.
mbed_official 133:d4dda5c437f0 8 ******************************************************************************
mbed_official 133:d4dda5c437f0 9 * @attention
mbed_official 133:d4dda5c437f0 10 *
mbed_official 133:d4dda5c437f0 11 * <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
mbed_official 133:d4dda5c437f0 12 *
mbed_official 133:d4dda5c437f0 13 * Redistribution and use in source and binary forms, with or without modification,
mbed_official 133:d4dda5c437f0 14 * are permitted provided that the following conditions are met:
mbed_official 133:d4dda5c437f0 15 * 1. Redistributions of source code must retain the above copyright notice,
mbed_official 133:d4dda5c437f0 16 * this list of conditions and the following disclaimer.
mbed_official 133:d4dda5c437f0 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
mbed_official 133:d4dda5c437f0 18 * this list of conditions and the following disclaimer in the documentation
mbed_official 133:d4dda5c437f0 19 * and/or other materials provided with the distribution.
mbed_official 133:d4dda5c437f0 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
mbed_official 133:d4dda5c437f0 21 * may be used to endorse or promote products derived from this software
mbed_official 133:d4dda5c437f0 22 * without specific prior written permission.
mbed_official 133:d4dda5c437f0 23 *
mbed_official 133:d4dda5c437f0 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
mbed_official 133:d4dda5c437f0 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
mbed_official 133:d4dda5c437f0 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
mbed_official 133:d4dda5c437f0 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
mbed_official 133:d4dda5c437f0 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
mbed_official 133:d4dda5c437f0 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
mbed_official 133:d4dda5c437f0 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
mbed_official 133:d4dda5c437f0 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
mbed_official 133:d4dda5c437f0 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
mbed_official 133:d4dda5c437f0 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
mbed_official 133:d4dda5c437f0 34 *
mbed_official 133:d4dda5c437f0 35 ******************************************************************************
mbed_official 133:d4dda5c437f0 36 */
mbed_official 133:d4dda5c437f0 37
mbed_official 133:d4dda5c437f0 38 /* Define to prevent recursive inclusion -------------------------------------*/
mbed_official 133:d4dda5c437f0 39 #ifndef __STM32F4xx_HAL_PCD_H
mbed_official 133:d4dda5c437f0 40 #define __STM32F4xx_HAL_PCD_H
mbed_official 133:d4dda5c437f0 41
mbed_official 133:d4dda5c437f0 42 #ifdef __cplusplus
mbed_official 133:d4dda5c437f0 43 extern "C" {
mbed_official 133:d4dda5c437f0 44 #endif
mbed_official 133:d4dda5c437f0 45
mbed_official 133:d4dda5c437f0 46 /* Includes ------------------------------------------------------------------*/
mbed_official 133:d4dda5c437f0 47 #include "stm32f4xx_ll_usb.h"
mbed_official 133:d4dda5c437f0 48
mbed_official 133:d4dda5c437f0 49 /** @addtogroup STM32F4xx_HAL_Driver
mbed_official 133:d4dda5c437f0 50 * @{
mbed_official 133:d4dda5c437f0 51 */
mbed_official 133:d4dda5c437f0 52
mbed_official 133:d4dda5c437f0 53 /** @addtogroup PCD
mbed_official 133:d4dda5c437f0 54 * @{
mbed_official 133:d4dda5c437f0 55 */
mbed_official 133:d4dda5c437f0 56
mbed_official 133:d4dda5c437f0 57 /* Exported types ------------------------------------------------------------*/
mbed_official 133:d4dda5c437f0 58
mbed_official 133:d4dda5c437f0 59 /**
mbed_official 133:d4dda5c437f0 60 * @brief PCD State structures definition
mbed_official 133:d4dda5c437f0 61 */
mbed_official 133:d4dda5c437f0 62 typedef enum
mbed_official 133:d4dda5c437f0 63 {
mbed_official 133:d4dda5c437f0 64 PCD_READY = 0x00,
mbed_official 133:d4dda5c437f0 65 PCD_ERROR = 0x01,
mbed_official 133:d4dda5c437f0 66 PCD_BUSY = 0x02,
mbed_official 133:d4dda5c437f0 67 PCD_TIMEOUT = 0x03
mbed_official 133:d4dda5c437f0 68 } PCD_StateTypeDef;
mbed_official 133:d4dda5c437f0 69
mbed_official 133:d4dda5c437f0 70
mbed_official 133:d4dda5c437f0 71 typedef USB_OTG_GlobalTypeDef PCD_TypeDef;
mbed_official 133:d4dda5c437f0 72 typedef USB_OTG_CfgTypeDef PCD_InitTypeDef;
mbed_official 133:d4dda5c437f0 73 typedef USB_OTG_EPTypeDef PCD_EPTypeDef ;
mbed_official 133:d4dda5c437f0 74
mbed_official 133:d4dda5c437f0 75 /**
mbed_official 133:d4dda5c437f0 76 * @brief PCD Handle Structure definition
mbed_official 133:d4dda5c437f0 77 */
mbed_official 133:d4dda5c437f0 78 typedef struct
mbed_official 133:d4dda5c437f0 79 {
mbed_official 133:d4dda5c437f0 80 PCD_TypeDef *Instance; /*!< Register base address */
mbed_official 133:d4dda5c437f0 81 PCD_InitTypeDef Init; /*!< PCD required parameters */
mbed_official 133:d4dda5c437f0 82 PCD_EPTypeDef IN_ep[15]; /*!< IN endpoint parameters */
mbed_official 133:d4dda5c437f0 83 PCD_EPTypeDef OUT_ep[15]; /*!< OUT endpoint parameters */
mbed_official 133:d4dda5c437f0 84 HAL_LockTypeDef Lock; /*!< PCD peripheral status */
mbed_official 133:d4dda5c437f0 85 __IO PCD_StateTypeDef State; /*!< PCD communication state */
mbed_official 133:d4dda5c437f0 86 uint32_t Setup[12]; /*!< Setup packet buffer */
mbed_official 133:d4dda5c437f0 87 void *pData; /*!< Pointer to upper stack Handler */
mbed_official 133:d4dda5c437f0 88
mbed_official 133:d4dda5c437f0 89 } PCD_HandleTypeDef;
mbed_official 133:d4dda5c437f0 90
mbed_official 133:d4dda5c437f0 91 /* Exported constants --------------------------------------------------------*/
mbed_official 133:d4dda5c437f0 92 /** @defgroup PCD_Exported_Constants
mbed_official 133:d4dda5c437f0 93 * @{
mbed_official 133:d4dda5c437f0 94 */
mbed_official 133:d4dda5c437f0 95
mbed_official 133:d4dda5c437f0 96 /** @defgroup PCD_Speed
mbed_official 133:d4dda5c437f0 97 * @{
mbed_official 133:d4dda5c437f0 98 */
mbed_official 133:d4dda5c437f0 99 #define PCD_SPEED_HIGH 0
mbed_official 133:d4dda5c437f0 100 #define PCD_SPEED_HIGH_IN_FULL 1
mbed_official 133:d4dda5c437f0 101 #define PCD_SPEED_FULL 2
mbed_official 133:d4dda5c437f0 102 /**
mbed_official 133:d4dda5c437f0 103 * @}
mbed_official 133:d4dda5c437f0 104 */
mbed_official 133:d4dda5c437f0 105
mbed_official 133:d4dda5c437f0 106 /** @defgroup PCD_PHY_Module
mbed_official 133:d4dda5c437f0 107 * @{
mbed_official 133:d4dda5c437f0 108 */
mbed_official 133:d4dda5c437f0 109 #define PCD_PHY_ULPI 1
mbed_official 133:d4dda5c437f0 110 #define PCD_PHY_EMBEDDED 2
mbed_official 133:d4dda5c437f0 111 /**
mbed_official 133:d4dda5c437f0 112 * @}
mbed_official 133:d4dda5c437f0 113 */
mbed_official 133:d4dda5c437f0 114
mbed_official 133:d4dda5c437f0 115 /** @defgroup PCD_Instance_definition
mbed_official 133:d4dda5c437f0 116 * @{
mbed_official 133:d4dda5c437f0 117 */
mbed_official 133:d4dda5c437f0 118 #if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx) || defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx)
mbed_official 133:d4dda5c437f0 119 #define IS_PCD_ALL_INSTANCE(INSTANCE) (((INSTANCE) == USB_OTG_FS) || \
mbed_official 133:d4dda5c437f0 120 ((INSTANCE) == USB_OTG_HS))
mbed_official 133:d4dda5c437f0 121 #elif defined(STM32F401xC) || defined(STM32F401xE)
mbed_official 133:d4dda5c437f0 122 #define IS_PCD_ALL_INSTANCE(INSTANCE) (((INSTANCE) == USB_OTG_FS))
mbed_official 133:d4dda5c437f0 123 #endif
mbed_official 133:d4dda5c437f0 124
mbed_official 133:d4dda5c437f0 125 /**
mbed_official 133:d4dda5c437f0 126 * @}
mbed_official 133:d4dda5c437f0 127 */
mbed_official 133:d4dda5c437f0 128
mbed_official 133:d4dda5c437f0 129 /**
mbed_official 133:d4dda5c437f0 130 * @}
mbed_official 133:d4dda5c437f0 131 */
mbed_official 133:d4dda5c437f0 132
mbed_official 133:d4dda5c437f0 133 /* Exported macro ------------------------------------------------------------*/
mbed_official 133:d4dda5c437f0 134
mbed_official 133:d4dda5c437f0 135 /** @defgroup PCD_Interrupt_Clock
mbed_official 133:d4dda5c437f0 136 * @brief macros to handle interrupts and specific clock configurations
mbed_official 133:d4dda5c437f0 137 * @{
mbed_official 133:d4dda5c437f0 138 */
mbed_official 133:d4dda5c437f0 139 #define __HAL_PCD_ENABLE(__HANDLE__) USB_EnableGlobalInt ((__HANDLE__)->Instance)
mbed_official 133:d4dda5c437f0 140 #define __HAL_PCD_DISABLE(__HANDLE__) USB_DisableGlobalInt ((__HANDLE__)->Instance)
mbed_official 133:d4dda5c437f0 141
mbed_official 133:d4dda5c437f0 142 #define __HAL_GET_FLAG(__HANDLE__, __INTERRUPT__) ((USB_ReadInterrupts((__HANDLE__)->Instance) & (__INTERRUPT__)) == (__INTERRUPT__))
mbed_official 133:d4dda5c437f0 143 #define __HAL_CLEAR_FLAG(__HANDLE__, __INTERRUPT__) (((__HANDLE__)->Instance->GINTSTS) |= (__INTERRUPT__))
mbed_official 133:d4dda5c437f0 144 #define __HAL_IS_INVALID_INTERRUPT(__HANDLE__) (USB_ReadInterrupts((__HANDLE__)->Instance) == 0)
mbed_official 133:d4dda5c437f0 145
mbed_official 133:d4dda5c437f0 146
mbed_official 133:d4dda5c437f0 147 #define __HAL_PCD_UNGATE_PHYCLOCK(__HANDLE__) *(__IO uint32_t *)((uint32_t)((__HANDLE__)->Instance) + USB_OTG_PCGCCTL_BASE) &= \
mbed_official 133:d4dda5c437f0 148 ~(USB_OTG_PCGCCTL_STOPCLK)
mbed_official 133:d4dda5c437f0 149
mbed_official 133:d4dda5c437f0 150
mbed_official 133:d4dda5c437f0 151 #define __HAL_PCD_GATE_PHYCLOCK(__HANDLE__) *(__IO uint32_t *)((uint32_t)((__HANDLE__)->Instance) + USB_OTG_PCGCCTL_BASE) |= USB_OTG_PCGCCTL_STOPCLK
mbed_official 133:d4dda5c437f0 152
mbed_official 133:d4dda5c437f0 153 #define __HAL_PCD_IS_PHY_SUSPENDED(__HANDLE__) ((*(__IO uint32_t *)((uint32_t)((__HANDLE__)->Instance) + USB_OTG_PCGCCTL_BASE))&0x10)
mbed_official 133:d4dda5c437f0 154
mbed_official 133:d4dda5c437f0 155 #define USB_FS_EXTI_TRIGGER_RISING_EDGE ((uint32_t)0x08)
mbed_official 133:d4dda5c437f0 156 #define USB_FS_EXTI_TRIGGER_FALLING_EDGE ((uint32_t)0x0C)
mbed_official 133:d4dda5c437f0 157 #define USB_FS_EXTI_TRIGGER_BOTH_EDGE ((uint32_t)0x10)
mbed_official 133:d4dda5c437f0 158
mbed_official 133:d4dda5c437f0 159 #define USB_HS_EXTI_TRIGGER_RISING_EDGE ((uint32_t)0x08)
mbed_official 133:d4dda5c437f0 160 #define USB_HS_EXTI_TRIGGER_FALLING_EDGE ((uint32_t)0x0C)
mbed_official 133:d4dda5c437f0 161 #define USB_HS_EXTI_TRIGGER_BOTH_EDGE ((uint32_t)0x10)
mbed_official 133:d4dda5c437f0 162
mbed_official 133:d4dda5c437f0 163
mbed_official 133:d4dda5c437f0 164 #define USB_HS_EXTI_LINE_WAKEUP ((uint32_t)0x00100000) /*!< External interrupt line 20 Connected to the USB HS EXTI Line */
mbed_official 133:d4dda5c437f0 165 #define USB_FS_EXTI_LINE_WAKEUP ((uint32_t)0x00040000) /*!< External interrupt line 18 Connected to the USB FS EXTI Line */
mbed_official 133:d4dda5c437f0 166
mbed_official 133:d4dda5c437f0 167
mbed_official 133:d4dda5c437f0 168
mbed_official 133:d4dda5c437f0 169 #define __HAL_USB_HS_EXTI_ENABLE_IT() EXTI->IMR |= (USB_HS_EXTI_LINE_WAKEUP)
mbed_official 133:d4dda5c437f0 170 #define __HAL_USB_HS_EXTI_DISABLE_IT() EXTI->IMR &= ~(USB_HS_EXTI_LINE_WAKEUP)
mbed_official 133:d4dda5c437f0 171 #define __HAL_USB_HS_EXTI_GET_FLAG() EXTI->PR & (USB_HS_EXTI_LINE_WAKEUP)
mbed_official 133:d4dda5c437f0 172 #define __HAL_USB_HS_EXTI_CLEAR_FLAG() EXTI->PR = (USB_HS_EXTI_LINE_WAKEUP)
mbed_official 133:d4dda5c437f0 173
mbed_official 133:d4dda5c437f0 174 #define __HAL_USB_HS_EXTI_SET_RISING_EGDE_TRIGGER() EXTI->FTSR &= ~(USB_HS_EXTI_LINE_WAKEUP);\
mbed_official 133:d4dda5c437f0 175 EXTI->RTSR |= USB_HS_EXTI_LINE_WAKEUP
mbed_official 133:d4dda5c437f0 176
mbed_official 133:d4dda5c437f0 177
mbed_official 133:d4dda5c437f0 178 #define __HAL_USB_HS_EXTI_SET_FALLING_EGDE_TRIGGER() EXTI->FTSR |= (USB_HS_EXTI_LINE_WAKEUP);\
mbed_official 133:d4dda5c437f0 179 EXTI->RTSR &= ~(USB_HS_EXTI_LINE_WAKEUP)
mbed_official 133:d4dda5c437f0 180
mbed_official 133:d4dda5c437f0 181
mbed_official 133:d4dda5c437f0 182 #define __HAL_USB_HS_EXTI_SET_FALLINGRISING_TRIGGER() EXTI->RTSR &= ~(USB_HS_EXTI_LINE_WAKEUP);\
mbed_official 133:d4dda5c437f0 183 EXTI->FTSR &= ~(USB_HS_EXTI_LINE_WAKEUP;)\
mbed_official 133:d4dda5c437f0 184 EXTI->RTSR |= USB_HS_EXTI_LINE_WAKEUP;\
mbed_official 133:d4dda5c437f0 185 EXTI->FTSR |= USB_HS_EXTI_LINE_WAKEUP
mbed_official 133:d4dda5c437f0 186
mbed_official 133:d4dda5c437f0 187
mbed_official 133:d4dda5c437f0 188 #define __HAL_USB_FS_EXTI_ENABLE_IT() EXTI->IMR |= USB_FS_EXTI_LINE_WAKEUP
mbed_official 133:d4dda5c437f0 189 #define __HAL_USB_FS_EXTI_DISABLE_IT() EXTI->IMR &= ~(USB_FS_EXTI_LINE_WAKEUP)
mbed_official 133:d4dda5c437f0 190 #define __HAL_USB_FS_EXTI_GET_FLAG() EXTI->PR & (USB_FS_EXTI_LINE_WAKEUP)
mbed_official 133:d4dda5c437f0 191 #define __HAL_USB_FS_EXTI_CLEAR_FLAG() EXTI->PR = USB_FS_EXTI_LINE_WAKEUP
mbed_official 133:d4dda5c437f0 192
mbed_official 133:d4dda5c437f0 193 #define __HAL_USB_FS_EXTI_SET_RISING_EGDE_TRIGGER() EXTI->FTSR &= ~(USB_FS_EXTI_LINE_WAKEUP);\
mbed_official 133:d4dda5c437f0 194 EXTI->RTSR |= USB_FS_EXTI_LINE_WAKEUP
mbed_official 133:d4dda5c437f0 195
mbed_official 133:d4dda5c437f0 196
mbed_official 133:d4dda5c437f0 197 #define __HAL_USB_FS_EXTI_SET_FALLING_EGDE_TRIGGER() EXTI->FTSR |= (USB_FS_EXTI_LINE_WAKEUP);\
mbed_official 133:d4dda5c437f0 198 EXTI->RTSR &= ~(USB_FS_EXTI_LINE_WAKEUP)
mbed_official 133:d4dda5c437f0 199
mbed_official 133:d4dda5c437f0 200
mbed_official 133:d4dda5c437f0 201 #define __HAL_USB_FS_EXTI_SET_FALLINGRISING_TRIGGER() EXTI->RTSR &= ~(USB_FS_EXTI_LINE_WAKEUP);\
mbed_official 133:d4dda5c437f0 202 EXTI->FTSR &= ~(USB_FS_EXTI_LINE_WAKEUP);\
mbed_official 133:d4dda5c437f0 203 EXTI->RTSR |= USB_FS_EXTI_LINE_WAKEUP;\
mbed_official 133:d4dda5c437f0 204 EXTI->FTSR |= USB_FS_EXTI_LINE_WAKEUP
mbed_official 133:d4dda5c437f0 205
mbed_official 133:d4dda5c437f0 206 /**
mbed_official 133:d4dda5c437f0 207 * @}
mbed_official 133:d4dda5c437f0 208 */
mbed_official 133:d4dda5c437f0 209
mbed_official 133:d4dda5c437f0 210 /* Exported functions --------------------------------------------------------*/
mbed_official 133:d4dda5c437f0 211
mbed_official 133:d4dda5c437f0 212 /* Initialization/de-initialization functions **********************************/
mbed_official 133:d4dda5c437f0 213 HAL_StatusTypeDef HAL_PCD_Init(PCD_HandleTypeDef *hpcd);
mbed_official 133:d4dda5c437f0 214 HAL_StatusTypeDef HAL_PCD_DeInit (PCD_HandleTypeDef *hpcd);
mbed_official 133:d4dda5c437f0 215 void HAL_PCD_MspInit(PCD_HandleTypeDef *hpcd);
mbed_official 133:d4dda5c437f0 216 void HAL_PCD_MspDeInit(PCD_HandleTypeDef *hpcd);
mbed_official 133:d4dda5c437f0 217
mbed_official 133:d4dda5c437f0 218 /* I/O operation functions *****************************************************/
mbed_official 133:d4dda5c437f0 219 /* Non-Blocking mode: Interrupt */
mbed_official 133:d4dda5c437f0 220 HAL_StatusTypeDef HAL_PCD_Start(PCD_HandleTypeDef *hpcd);
mbed_official 133:d4dda5c437f0 221 HAL_StatusTypeDef HAL_PCD_Stop(PCD_HandleTypeDef *hpcd);
mbed_official 133:d4dda5c437f0 222 void HAL_PCD_IRQHandler(PCD_HandleTypeDef *hpcd);
mbed_official 133:d4dda5c437f0 223
mbed_official 133:d4dda5c437f0 224 void HAL_PCD_DataOutStageCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum);
mbed_official 133:d4dda5c437f0 225 void HAL_PCD_DataInStageCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum);
mbed_official 133:d4dda5c437f0 226 void HAL_PCD_SetupStageCallback(PCD_HandleTypeDef *hpcd);
mbed_official 133:d4dda5c437f0 227 void HAL_PCD_SOFCallback(PCD_HandleTypeDef *hpcd);
mbed_official 133:d4dda5c437f0 228 void HAL_PCD_ResetCallback(PCD_HandleTypeDef *hpcd);
mbed_official 133:d4dda5c437f0 229 void HAL_PCD_SuspendCallback(PCD_HandleTypeDef *hpcd);
mbed_official 133:d4dda5c437f0 230 void HAL_PCD_ResumeCallback(PCD_HandleTypeDef *hpcd);
mbed_official 133:d4dda5c437f0 231 void HAL_PCD_ISOOUTIncompleteCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum);
mbed_official 133:d4dda5c437f0 232 void HAL_PCD_ISOINIncompleteCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum);
mbed_official 133:d4dda5c437f0 233 void HAL_PCD_ConnectCallback(PCD_HandleTypeDef *hpcd);
mbed_official 133:d4dda5c437f0 234 void HAL_PCD_DisconnectCallback(PCD_HandleTypeDef *hpcd);
mbed_official 133:d4dda5c437f0 235
mbed_official 133:d4dda5c437f0 236
mbed_official 133:d4dda5c437f0 237
mbed_official 133:d4dda5c437f0 238 /* Peripheral Control functions ************************************************/
mbed_official 133:d4dda5c437f0 239 HAL_StatusTypeDef HAL_PCD_DevConnect(PCD_HandleTypeDef *hpcd);
mbed_official 133:d4dda5c437f0 240 HAL_StatusTypeDef HAL_PCD_DevDisconnect(PCD_HandleTypeDef *hpcd);
mbed_official 133:d4dda5c437f0 241 HAL_StatusTypeDef HAL_PCD_SetAddress(PCD_HandleTypeDef *hpcd, uint8_t address);
mbed_official 133:d4dda5c437f0 242 HAL_StatusTypeDef HAL_PCD_EP_Open(PCD_HandleTypeDef *hpcd, uint8_t ep_addr, uint16_t ep_mps, uint8_t ep_type);
mbed_official 133:d4dda5c437f0 243 HAL_StatusTypeDef HAL_PCD_EP_Close(PCD_HandleTypeDef *hpcd, uint8_t ep_addr);
mbed_official 133:d4dda5c437f0 244 HAL_StatusTypeDef HAL_PCD_EP_Receive(PCD_HandleTypeDef *hpcd, uint8_t ep_addr, uint8_t *pBuf, uint32_t len);
mbed_official 133:d4dda5c437f0 245 HAL_StatusTypeDef HAL_PCD_EP_Transmit(PCD_HandleTypeDef *hpcd, uint8_t ep_addr, uint8_t *pBuf, uint32_t len);
mbed_official 133:d4dda5c437f0 246 uint16_t HAL_PCD_EP_GetRxCount(PCD_HandleTypeDef *hpcd, uint8_t ep_addr);
mbed_official 133:d4dda5c437f0 247 HAL_StatusTypeDef HAL_PCD_EP_SetStall(PCD_HandleTypeDef *hpcd, uint8_t ep_addr);
mbed_official 133:d4dda5c437f0 248 HAL_StatusTypeDef HAL_PCD_EP_ClrStall(PCD_HandleTypeDef *hpcd, uint8_t ep_addr);
mbed_official 133:d4dda5c437f0 249 HAL_StatusTypeDef HAL_PCD_EP_Flush(PCD_HandleTypeDef *hpcd, uint8_t ep_addr);
mbed_official 133:d4dda5c437f0 250 HAL_StatusTypeDef HAL_PCD_SetTxFiFo(PCD_HandleTypeDef *hpcd, uint8_t fifo, uint16_t size);
mbed_official 133:d4dda5c437f0 251 HAL_StatusTypeDef HAL_PCD_SetRxFiFo(PCD_HandleTypeDef *hpcd, uint16_t size);
mbed_official 133:d4dda5c437f0 252 HAL_StatusTypeDef HAL_PCD_ActiveRemoteWakeup(PCD_HandleTypeDef *hpcd);
mbed_official 133:d4dda5c437f0 253 HAL_StatusTypeDef HAL_PCD_DeActiveRemoteWakeup(PCD_HandleTypeDef *hpcd);
mbed_official 133:d4dda5c437f0 254 /* Peripheral State functions **************************************************/
mbed_official 133:d4dda5c437f0 255 PCD_StateTypeDef HAL_PCD_GetState(PCD_HandleTypeDef *hpcd);
mbed_official 133:d4dda5c437f0 256
mbed_official 133:d4dda5c437f0 257 /**
mbed_official 133:d4dda5c437f0 258 * @}
mbed_official 133:d4dda5c437f0 259 */
mbed_official 133:d4dda5c437f0 260
mbed_official 133:d4dda5c437f0 261 /**
mbed_official 133:d4dda5c437f0 262 * @}
mbed_official 133:d4dda5c437f0 263 */
mbed_official 133:d4dda5c437f0 264
mbed_official 133:d4dda5c437f0 265 #ifdef __cplusplus
mbed_official 133:d4dda5c437f0 266 }
mbed_official 133:d4dda5c437f0 267 #endif
mbed_official 133:d4dda5c437f0 268
mbed_official 133:d4dda5c437f0 269
mbed_official 133:d4dda5c437f0 270 #endif /* __STM32F4xx_HAL_PCD_H */
mbed_official 133:d4dda5c437f0 271
mbed_official 133:d4dda5c437f0 272 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/