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