Lancaster University's (short term!) clone of mbed-src for micro:bit. This is a copy of the github branch https://github.com/lancaster-university/mbed-classic

Fork of mbed-src by mbed official

Committer:
mbed_official
Date:
Fri Aug 14 13:15:17 2015 +0100
Revision:
610:813dcc80987e
Synchronized with git revision 6d84db41c6833e0b9b024741eb0616a5f62d5599

Full URL: https://github.com/mbedmicro/mbed/commit/6d84db41c6833e0b9b024741eb0616a5f62d5599/

DISCO_F746NG - Improvements

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 610:813dcc80987e 1 /**
mbed_official 610:813dcc80987e 2 ******************************************************************************
mbed_official 610:813dcc80987e 3 * @file stm32l4xx_hal_pcd.h
mbed_official 610:813dcc80987e 4 * @author MCD Application Team
mbed_official 610:813dcc80987e 5 * @version V1.0.0
mbed_official 610:813dcc80987e 6 * @date 26-June-2015
mbed_official 610:813dcc80987e 7 * @brief Header file of PCD HAL module.
mbed_official 610:813dcc80987e 8 ******************************************************************************
mbed_official 610:813dcc80987e 9 * @attention
mbed_official 610:813dcc80987e 10 *
mbed_official 610:813dcc80987e 11 * <h2><center>&copy; COPYRIGHT(c) 2015 STMicroelectronics</center></h2>
mbed_official 610:813dcc80987e 12 *
mbed_official 610:813dcc80987e 13 * Redistribution and use in source and binary forms, with or without modification,
mbed_official 610:813dcc80987e 14 * are permitted provided that the following conditions are met:
mbed_official 610:813dcc80987e 15 * 1. Redistributions of source code must retain the above copyright notice,
mbed_official 610:813dcc80987e 16 * this list of conditions and the following disclaimer.
mbed_official 610:813dcc80987e 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
mbed_official 610:813dcc80987e 18 * this list of conditions and the following disclaimer in the documentation
mbed_official 610:813dcc80987e 19 * and/or other materials provided with the distribution.
mbed_official 610:813dcc80987e 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
mbed_official 610:813dcc80987e 21 * may be used to endorse or promote products derived from this software
mbed_official 610:813dcc80987e 22 * without specific prior written permission.
mbed_official 610:813dcc80987e 23 *
mbed_official 610:813dcc80987e 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
mbed_official 610:813dcc80987e 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
mbed_official 610:813dcc80987e 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
mbed_official 610:813dcc80987e 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
mbed_official 610:813dcc80987e 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
mbed_official 610:813dcc80987e 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
mbed_official 610:813dcc80987e 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
mbed_official 610:813dcc80987e 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
mbed_official 610:813dcc80987e 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
mbed_official 610:813dcc80987e 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
mbed_official 610:813dcc80987e 34 *
mbed_official 610:813dcc80987e 35 ******************************************************************************
mbed_official 610:813dcc80987e 36 */
mbed_official 610:813dcc80987e 37
mbed_official 610:813dcc80987e 38 /* Define to prevent recursive inclusion -------------------------------------*/
mbed_official 610:813dcc80987e 39 #ifndef __STM32L4xx_HAL_PCD_H
mbed_official 610:813dcc80987e 40 #define __STM32L4xx_HAL_PCD_H
mbed_official 610:813dcc80987e 41
mbed_official 610:813dcc80987e 42 #ifdef __cplusplus
mbed_official 610:813dcc80987e 43 extern "C" {
mbed_official 610:813dcc80987e 44 #endif
mbed_official 610:813dcc80987e 45
mbed_official 610:813dcc80987e 46 #if defined(STM32L475xx) || defined(STM32L476xx) || defined(STM32L485xx) || defined(STM32L486xx)
mbed_official 610:813dcc80987e 47
mbed_official 610:813dcc80987e 48 /* Includes ------------------------------------------------------------------*/
mbed_official 610:813dcc80987e 49 #include "stm32l4xx_ll_usb.h"
mbed_official 610:813dcc80987e 50
mbed_official 610:813dcc80987e 51 /** @addtogroup STM32L4xx_HAL_Driver
mbed_official 610:813dcc80987e 52 * @{
mbed_official 610:813dcc80987e 53 */
mbed_official 610:813dcc80987e 54
mbed_official 610:813dcc80987e 55 /** @addtogroup PCD
mbed_official 610:813dcc80987e 56 * @{
mbed_official 610:813dcc80987e 57 */
mbed_official 610:813dcc80987e 58
mbed_official 610:813dcc80987e 59 /* Exported types ------------------------------------------------------------*/
mbed_official 610:813dcc80987e 60 /** @defgroup PCD_Exported_Types PCD Exported Types
mbed_official 610:813dcc80987e 61 * @{
mbed_official 610:813dcc80987e 62 */
mbed_official 610:813dcc80987e 63
mbed_official 610:813dcc80987e 64 /**
mbed_official 610:813dcc80987e 65 * @brief PCD State structure definition
mbed_official 610:813dcc80987e 66 */
mbed_official 610:813dcc80987e 67 typedef enum
mbed_official 610:813dcc80987e 68 {
mbed_official 610:813dcc80987e 69 HAL_PCD_STATE_RESET = 0x00,
mbed_official 610:813dcc80987e 70 HAL_PCD_STATE_READY = 0x01,
mbed_official 610:813dcc80987e 71 HAL_PCD_STATE_ERROR = 0x02,
mbed_official 610:813dcc80987e 72 HAL_PCD_STATE_BUSY = 0x03,
mbed_official 610:813dcc80987e 73 HAL_PCD_STATE_TIMEOUT = 0x04
mbed_official 610:813dcc80987e 74 } PCD_StateTypeDef;
mbed_official 610:813dcc80987e 75
mbed_official 610:813dcc80987e 76 /* Device LPM suspend state */
mbed_official 610:813dcc80987e 77 typedef enum
mbed_official 610:813dcc80987e 78 {
mbed_official 610:813dcc80987e 79 LPM_L0 = 0x00, /* on */
mbed_official 610:813dcc80987e 80 LPM_L1 = 0x01, /* LPM L1 sleep */
mbed_official 610:813dcc80987e 81 LPM_L2 = 0x02, /* suspend */
mbed_official 610:813dcc80987e 82 LPM_L3 = 0x03, /* off */
mbed_official 610:813dcc80987e 83 }PCD_LPM_StateTypeDef;
mbed_official 610:813dcc80987e 84
mbed_official 610:813dcc80987e 85 typedef USB_OTG_GlobalTypeDef PCD_TypeDef;
mbed_official 610:813dcc80987e 86 typedef USB_OTG_CfgTypeDef PCD_InitTypeDef;
mbed_official 610:813dcc80987e 87 typedef USB_OTG_EPTypeDef PCD_EPTypeDef ;
mbed_official 610:813dcc80987e 88
mbed_official 610:813dcc80987e 89 /**
mbed_official 610:813dcc80987e 90 * @brief PCD Handle Structure definition
mbed_official 610:813dcc80987e 91 */
mbed_official 610:813dcc80987e 92 typedef struct
mbed_official 610:813dcc80987e 93 {
mbed_official 610:813dcc80987e 94 PCD_TypeDef *Instance; /*!< Register base address */
mbed_official 610:813dcc80987e 95 PCD_InitTypeDef Init; /*!< PCD required parameters */
mbed_official 610:813dcc80987e 96 PCD_EPTypeDef IN_ep[15]; /*!< IN endpoint parameters */
mbed_official 610:813dcc80987e 97 PCD_EPTypeDef OUT_ep[15]; /*!< OUT endpoint parameters */
mbed_official 610:813dcc80987e 98 HAL_LockTypeDef Lock; /*!< PCD peripheral status */
mbed_official 610:813dcc80987e 99 __IO PCD_StateTypeDef State; /*!< PCD communication state */
mbed_official 610:813dcc80987e 100 uint32_t Setup[12]; /*!< Setup packet buffer */
mbed_official 610:813dcc80987e 101 PCD_LPM_StateTypeDef LPM_State; /*!< LPM State */
mbed_official 610:813dcc80987e 102 uint32_t BESL;
mbed_official 610:813dcc80987e 103
mbed_official 610:813dcc80987e 104
mbed_official 610:813dcc80987e 105 uint32_t lpm_active; /*!< Enable or disable the Link Power Management .
mbed_official 610:813dcc80987e 106 This parameter can be set to ENABLE or DISABLE */
mbed_official 610:813dcc80987e 107
mbed_official 610:813dcc80987e 108 uint32_t battery_charging_active; /*!< Enable or disable Battery charging.
mbed_official 610:813dcc80987e 109 This parameter can be set to ENABLE or DISABLE */
mbed_official 610:813dcc80987e 110 void *pData; /*!< Pointer to upper stack Handler */
mbed_official 610:813dcc80987e 111
mbed_official 610:813dcc80987e 112 } PCD_HandleTypeDef;
mbed_official 610:813dcc80987e 113
mbed_official 610:813dcc80987e 114 /**
mbed_official 610:813dcc80987e 115 * @}
mbed_official 610:813dcc80987e 116 */
mbed_official 610:813dcc80987e 117
mbed_official 610:813dcc80987e 118 /* Exported constants --------------------------------------------------------*/
mbed_official 610:813dcc80987e 119 /** @defgroup PCD_Exported_Constants PCD Exported Constants
mbed_official 610:813dcc80987e 120 * @{
mbed_official 610:813dcc80987e 121 */
mbed_official 610:813dcc80987e 122
mbed_official 610:813dcc80987e 123 /** @defgroup PCD_Speed PCD Speed
mbed_official 610:813dcc80987e 124 * @{
mbed_official 610:813dcc80987e 125 */
mbed_official 610:813dcc80987e 126 #define PCD_SPEED_FULL 1
mbed_official 610:813dcc80987e 127 /**
mbed_official 610:813dcc80987e 128 * @}
mbed_official 610:813dcc80987e 129 */
mbed_official 610:813dcc80987e 130
mbed_official 610:813dcc80987e 131 /** @defgroup PCD_PHY_Module PCD PHY Module
mbed_official 610:813dcc80987e 132 * @{
mbed_official 610:813dcc80987e 133 */
mbed_official 610:813dcc80987e 134 #define PCD_PHY_EMBEDDED 1
mbed_official 610:813dcc80987e 135 /**
mbed_official 610:813dcc80987e 136 * @}
mbed_official 610:813dcc80987e 137 */
mbed_official 610:813dcc80987e 138
mbed_official 610:813dcc80987e 139 /** @defgroup PCD_Turnaround_Timeout Turnaround Timeout Value
mbed_official 610:813dcc80987e 140 * @{
mbed_official 610:813dcc80987e 141 */
mbed_official 610:813dcc80987e 142 #ifndef USBD_FS_TRDT_VALUE
mbed_official 610:813dcc80987e 143 #define USBD_FS_TRDT_VALUE 5
mbed_official 610:813dcc80987e 144 #endif /* USBD_FS_TRDT_VALUE */
mbed_official 610:813dcc80987e 145 /**
mbed_official 610:813dcc80987e 146 * @}
mbed_official 610:813dcc80987e 147 */
mbed_official 610:813dcc80987e 148
mbed_official 610:813dcc80987e 149 /**
mbed_official 610:813dcc80987e 150 * @}
mbed_official 610:813dcc80987e 151 */
mbed_official 610:813dcc80987e 152
mbed_official 610:813dcc80987e 153 /* Exported macros -----------------------------------------------------------*/
mbed_official 610:813dcc80987e 154 /** @defgroup PCD_Exported_Macros PCD Exported Macros
mbed_official 610:813dcc80987e 155 * @brief macros to handle interrupts and specific clock configurations
mbed_official 610:813dcc80987e 156 * @{
mbed_official 610:813dcc80987e 157 */
mbed_official 610:813dcc80987e 158 #define __HAL_PCD_ENABLE(__HANDLE__) USB_EnableGlobalInt ((__HANDLE__)->Instance)
mbed_official 610:813dcc80987e 159 #define __HAL_PCD_DISABLE(__HANDLE__) USB_DisableGlobalInt ((__HANDLE__)->Instance)
mbed_official 610:813dcc80987e 160
mbed_official 610:813dcc80987e 161 #define __HAL_PCD_GET_FLAG(__HANDLE__, __INTERRUPT__) ((USB_ReadInterrupts((__HANDLE__)->Instance) & (__INTERRUPT__)) == (__INTERRUPT__))
mbed_official 610:813dcc80987e 162 #define __HAL_PCD_CLEAR_FLAG(__HANDLE__, __INTERRUPT__) (((__HANDLE__)->Instance->GINTSTS) &= (__INTERRUPT__))
mbed_official 610:813dcc80987e 163 #define __HAL_PCD_IS_INVALID_INTERRUPT(__HANDLE__) (USB_ReadInterrupts((__HANDLE__)->Instance) == 0)
mbed_official 610:813dcc80987e 164
mbed_official 610:813dcc80987e 165
mbed_official 610:813dcc80987e 166 #define __HAL_PCD_UNGATE_PHYCLOCK(__HANDLE__) *(__IO uint32_t *)((uint32_t)((__HANDLE__)->Instance) + USB_OTG_PCGCCTL_BASE) &= \
mbed_official 610:813dcc80987e 167 ~(USB_OTG_PCGCCTL_STOPCLK)
mbed_official 610:813dcc80987e 168
mbed_official 610:813dcc80987e 169 #define __HAL_PCD_GATE_PHYCLOCK(__HANDLE__) *(__IO uint32_t *)((uint32_t)((__HANDLE__)->Instance) + USB_OTG_PCGCCTL_BASE) |= USB_OTG_PCGCCTL_STOPCLK
mbed_official 610:813dcc80987e 170
mbed_official 610:813dcc80987e 171 #define __HAL_PCD_IS_PHY_SUSPENDED(__HANDLE__) ((*(__IO uint32_t *)((uint32_t)((__HANDLE__)->Instance) + USB_OTG_PCGCCTL_BASE))&0x10)
mbed_official 610:813dcc80987e 172
mbed_official 610:813dcc80987e 173 #define USB_OTG_FS_WAKEUP_EXTI_RISING_EDGE ((uint32_t)0x08)
mbed_official 610:813dcc80987e 174 #define USB_OTG_FS_WAKEUP_EXTI_FALLING_EDGE ((uint32_t)0x0C)
mbed_official 610:813dcc80987e 175 #define USB_OTG_FS_WAKEUP_EXTI_RISING_FALLING_EDGE ((uint32_t)0x10)
mbed_official 610:813dcc80987e 176
mbed_official 610:813dcc80987e 177 #define USB_OTG_FS_WAKEUP_EXTI_LINE ((uint32_t)0x00020000) /*!< External interrupt line 17 Connected to the USB FS EXTI Line */
mbed_official 610:813dcc80987e 178
mbed_official 610:813dcc80987e 179
mbed_official 610:813dcc80987e 180 #define __HAL_USB_OTG_FS_WAKEUP_EXTI_ENABLE_IT() EXTI->IMR1 |= USB_OTG_FS_WAKEUP_EXTI_LINE
mbed_official 610:813dcc80987e 181 #define __HAL_USB_OTG_FS_WAKEUP_EXTI_DISABLE_IT() EXTI->IMR1 &= ~(USB_OTG_FS_WAKEUP_EXTI_LINE)
mbed_official 610:813dcc80987e 182 #define __HAL_USB_OTG_FS_WAKEUP_EXTI_GET_FLAG() EXTI->PR1 & (USB_OTG_FS_WAKEUP_EXTI_LINE)
mbed_official 610:813dcc80987e 183 #define __HAL_USB_OTG_FS_WAKEUP_EXTI_CLEAR_FLAG() EXTI->PR1 = USB_OTG_FS_WAKEUP_EXTI_LINE
mbed_official 610:813dcc80987e 184
mbed_official 610:813dcc80987e 185 #define __HAL_USB_OTG_FS_WAKEUP_EXTI_ENABLE_RISING_EDGE() EXTI->FTSR1 &= ~(USB_OTG_FS_WAKEUP_EXTI_LINE);\
mbed_official 610:813dcc80987e 186 EXTI->RTSR1 |= USB_OTG_FS_WAKEUP_EXTI_LINE
mbed_official 610:813dcc80987e 187
mbed_official 610:813dcc80987e 188 #define __HAL_USB_OTG_FS_WAKEUP_EXTI_ENABLE_FALLING_EDGE() EXTI->FTSR1 |= (USB_OTG_FS_WAKEUP_EXTI_LINE);\
mbed_official 610:813dcc80987e 189 EXTI->RTSR1 &= ~(USB_OTG_FS_WAKEUP_EXTI_LINE)
mbed_official 610:813dcc80987e 190
mbed_official 610:813dcc80987e 191
mbed_official 610:813dcc80987e 192 #define __HAL_USB_OTG_FS_WAKEUP_EXTI_ENABLE_RISING_FALLING_EDGE() EXTI->RTSR1 &= ~(USB_OTG_FS_WAKEUP_EXTI_LINE);\
mbed_official 610:813dcc80987e 193 EXTI->FTSR1 &= ~(USB_OTG_FS_WAKEUP_EXTI_LINE);\
mbed_official 610:813dcc80987e 194 EXTI->RTSR1 |= USB_OTG_FS_WAKEUP_EXTI_LINE;\
mbed_official 610:813dcc80987e 195 EXTI->FTSR1 |= USB_OTG_FS_WAKEUP_EXTI_LINE
mbed_official 610:813dcc80987e 196
mbed_official 610:813dcc80987e 197 #define __HAL_USB_OTG_FS_WAKEUP_EXTI_GENERATE_SWIT() (EXTI->SWIER1 |= USB_OTG_FS_WAKEUP_EXTI_LINE)
mbed_official 610:813dcc80987e 198
mbed_official 610:813dcc80987e 199 /**
mbed_official 610:813dcc80987e 200 * @}
mbed_official 610:813dcc80987e 201 */
mbed_official 610:813dcc80987e 202
mbed_official 610:813dcc80987e 203 /* Include PCD HAL Extended module */
mbed_official 610:813dcc80987e 204 #include "stm32l4xx_hal_pcd_ex.h"
mbed_official 610:813dcc80987e 205
mbed_official 610:813dcc80987e 206 /** @addtogroup PCD_Exported_Functions PCD Exported Functions
mbed_official 610:813dcc80987e 207 * @{
mbed_official 610:813dcc80987e 208 */
mbed_official 610:813dcc80987e 209
mbed_official 610:813dcc80987e 210 /* Initialization/de-initialization functions ********************************/
mbed_official 610:813dcc80987e 211 /** @addtogroup PCD_Exported_Functions_Group1 Initialization and de-initialization functions
mbed_official 610:813dcc80987e 212 * @{
mbed_official 610:813dcc80987e 213 */
mbed_official 610:813dcc80987e 214 HAL_StatusTypeDef HAL_PCD_Init(PCD_HandleTypeDef *hpcd);
mbed_official 610:813dcc80987e 215 HAL_StatusTypeDef HAL_PCD_DeInit (PCD_HandleTypeDef *hpcd);
mbed_official 610:813dcc80987e 216 void HAL_PCD_MspInit(PCD_HandleTypeDef *hpcd);
mbed_official 610:813dcc80987e 217 void HAL_PCD_MspDeInit(PCD_HandleTypeDef *hpcd);
mbed_official 610:813dcc80987e 218 /**
mbed_official 610:813dcc80987e 219 * @}
mbed_official 610:813dcc80987e 220 */
mbed_official 610:813dcc80987e 221
mbed_official 610:813dcc80987e 222 /* I/O operation functions ***************************************************/
mbed_official 610:813dcc80987e 223 /* Non-Blocking mode: Interrupt */
mbed_official 610:813dcc80987e 224 /** @addtogroup PCD_Exported_Functions_Group2 Input and Output operation functions
mbed_official 610:813dcc80987e 225 * @{
mbed_official 610:813dcc80987e 226 */
mbed_official 610:813dcc80987e 227 /* Non-Blocking mode: Interrupt */
mbed_official 610:813dcc80987e 228 HAL_StatusTypeDef HAL_PCD_Start(PCD_HandleTypeDef *hpcd);
mbed_official 610:813dcc80987e 229 HAL_StatusTypeDef HAL_PCD_Stop(PCD_HandleTypeDef *hpcd);
mbed_official 610:813dcc80987e 230 void HAL_PCD_IRQHandler(PCD_HandleTypeDef *hpcd);
mbed_official 610:813dcc80987e 231
mbed_official 610:813dcc80987e 232 void HAL_PCD_DataOutStageCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum);
mbed_official 610:813dcc80987e 233 void HAL_PCD_DataInStageCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum);
mbed_official 610:813dcc80987e 234 void HAL_PCD_SetupStageCallback(PCD_HandleTypeDef *hpcd);
mbed_official 610:813dcc80987e 235 void HAL_PCD_SOFCallback(PCD_HandleTypeDef *hpcd);
mbed_official 610:813dcc80987e 236 void HAL_PCD_ResetCallback(PCD_HandleTypeDef *hpcd);
mbed_official 610:813dcc80987e 237 void HAL_PCD_SuspendCallback(PCD_HandleTypeDef *hpcd);
mbed_official 610:813dcc80987e 238 void HAL_PCD_ResumeCallback(PCD_HandleTypeDef *hpcd);
mbed_official 610:813dcc80987e 239 void HAL_PCD_ISOOUTIncompleteCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum);
mbed_official 610:813dcc80987e 240 void HAL_PCD_ISOINIncompleteCallback(PCD_HandleTypeDef *hpcd, uint8_t epnum);
mbed_official 610:813dcc80987e 241 void HAL_PCD_ConnectCallback(PCD_HandleTypeDef *hpcd);
mbed_official 610:813dcc80987e 242 void HAL_PCD_DisconnectCallback(PCD_HandleTypeDef *hpcd);
mbed_official 610:813dcc80987e 243 /**
mbed_official 610:813dcc80987e 244 * @}
mbed_official 610:813dcc80987e 245 */
mbed_official 610:813dcc80987e 246
mbed_official 610:813dcc80987e 247 /* Peripheral Control functions **********************************************/
mbed_official 610:813dcc80987e 248 /** @addtogroup PCD_Exported_Functions_Group3 Peripheral Control functions
mbed_official 610:813dcc80987e 249 * @{
mbed_official 610:813dcc80987e 250 */
mbed_official 610:813dcc80987e 251 HAL_StatusTypeDef HAL_PCD_DevConnect(PCD_HandleTypeDef *hpcd);
mbed_official 610:813dcc80987e 252 HAL_StatusTypeDef HAL_PCD_DevDisconnect(PCD_HandleTypeDef *hpcd);
mbed_official 610:813dcc80987e 253 HAL_StatusTypeDef HAL_PCD_SetAddress(PCD_HandleTypeDef *hpcd, uint8_t address);
mbed_official 610:813dcc80987e 254 HAL_StatusTypeDef HAL_PCD_EP_Open(PCD_HandleTypeDef *hpcd, uint8_t ep_addr, uint16_t ep_mps, uint8_t ep_type);
mbed_official 610:813dcc80987e 255 HAL_StatusTypeDef HAL_PCD_EP_Close(PCD_HandleTypeDef *hpcd, uint8_t ep_addr);
mbed_official 610:813dcc80987e 256 HAL_StatusTypeDef HAL_PCD_EP_Receive(PCD_HandleTypeDef *hpcd, uint8_t ep_addr, uint8_t *pBuf, uint32_t len);
mbed_official 610:813dcc80987e 257 HAL_StatusTypeDef HAL_PCD_EP_Transmit(PCD_HandleTypeDef *hpcd, uint8_t ep_addr, uint8_t *pBuf, uint32_t len);
mbed_official 610:813dcc80987e 258 uint16_t HAL_PCD_EP_GetRxCount(PCD_HandleTypeDef *hpcd, uint8_t ep_addr);
mbed_official 610:813dcc80987e 259 HAL_StatusTypeDef HAL_PCD_EP_SetStall(PCD_HandleTypeDef *hpcd, uint8_t ep_addr);
mbed_official 610:813dcc80987e 260 HAL_StatusTypeDef HAL_PCD_EP_ClrStall(PCD_HandleTypeDef *hpcd, uint8_t ep_addr);
mbed_official 610:813dcc80987e 261 HAL_StatusTypeDef HAL_PCD_EP_Flush(PCD_HandleTypeDef *hpcd, uint8_t ep_addr);
mbed_official 610:813dcc80987e 262 HAL_StatusTypeDef HAL_PCD_ActivateRemoteWakeup(PCD_HandleTypeDef *hpcd);
mbed_official 610:813dcc80987e 263 HAL_StatusTypeDef HAL_PCD_DeActivateRemoteWakeup(PCD_HandleTypeDef *hpcd);
mbed_official 610:813dcc80987e 264 /**
mbed_official 610:813dcc80987e 265 * @}
mbed_official 610:813dcc80987e 266 */
mbed_official 610:813dcc80987e 267
mbed_official 610:813dcc80987e 268 /* Peripheral State functions ************************************************/
mbed_official 610:813dcc80987e 269 /** @addtogroup PCD_Exported_Functions_Group4 Peripheral State functions
mbed_official 610:813dcc80987e 270 * @{
mbed_official 610:813dcc80987e 271 */
mbed_official 610:813dcc80987e 272 PCD_StateTypeDef HAL_PCD_GetState(PCD_HandleTypeDef *hpcd);
mbed_official 610:813dcc80987e 273 /**
mbed_official 610:813dcc80987e 274 * @}
mbed_official 610:813dcc80987e 275 */
mbed_official 610:813dcc80987e 276
mbed_official 610:813dcc80987e 277 /**
mbed_official 610:813dcc80987e 278 * @}
mbed_official 610:813dcc80987e 279 */
mbed_official 610:813dcc80987e 280
mbed_official 610:813dcc80987e 281 /* Private macros ------------------------------------------------------------*/
mbed_official 610:813dcc80987e 282 /** @defgroup PCD_Private_Macros PCD Private Macros
mbed_official 610:813dcc80987e 283 * @{
mbed_official 610:813dcc80987e 284 */
mbed_official 610:813dcc80987e 285
mbed_official 610:813dcc80987e 286 /**
mbed_official 610:813dcc80987e 287 * @}
mbed_official 610:813dcc80987e 288 */
mbed_official 610:813dcc80987e 289
mbed_official 610:813dcc80987e 290 /**
mbed_official 610:813dcc80987e 291 * @}
mbed_official 610:813dcc80987e 292 */
mbed_official 610:813dcc80987e 293
mbed_official 610:813dcc80987e 294 /**
mbed_official 610:813dcc80987e 295 * @}
mbed_official 610:813dcc80987e 296 */
mbed_official 610:813dcc80987e 297
mbed_official 610:813dcc80987e 298 #endif /* STM32L475xx || STM32L476xx || STM32L485xx || STM32L486xx */
mbed_official 610:813dcc80987e 299
mbed_official 610:813dcc80987e 300 #ifdef __cplusplus
mbed_official 610:813dcc80987e 301 }
mbed_official 610:813dcc80987e 302 #endif
mbed_official 610:813dcc80987e 303
mbed_official 610:813dcc80987e 304
mbed_official 610:813dcc80987e 305 #endif /* __STM32L4xx_HAL_PCD_H */
mbed_official 610:813dcc80987e 306
mbed_official 610:813dcc80987e 307 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/