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