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