Rev 2 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
| Rev 2 | Rev 6 | ||
|---|---|---|---|
| Line 47... | Line 47... | ||
| 47 | * @{ |
47 | * @{ |
| 48 | */ |
48 | */ |
| 49 | 49 | ||
| 50 | /** @defgroup PCDEx_Exported_Functions_Group1 Peripheral Control functions |
50 | /** @defgroup PCDEx_Exported_Functions_Group1 Peripheral Control functions |
| 51 | * @brief PCDEx control functions |
51 | * @brief PCDEx control functions |
| 52 | * |
52 | * |
| 53 | @verbatim |
53 | @verbatim |
| 54 | =============================================================================== |
54 | =============================================================================== |
| 55 | ##### Extended features functions ##### |
55 | ##### Extended features functions ##### |
| 56 | =============================================================================== |
56 | =============================================================================== |
| 57 | [..] This section provides functions allowing to: |
57 | [..] This section provides functions allowing to: |
| Line 76... | Line 76... | ||
| 76 | * in the LSB part of 32-bit value and endpoint buffer 1 address |
76 | * in the LSB part of 32-bit value and endpoint buffer 1 address |
| 77 | * in the MSB part of 32-bit value. |
77 | * in the MSB part of 32-bit value. |
| 78 | * @retval HAL status |
78 | * @retval HAL status |
| 79 | */ |
79 | */ |
| 80 | 80 | ||
| 81 | HAL_StatusTypeDef HAL_PCDEx_PMAConfig(PCD_HandleTypeDef *hpcd, |
81 | HAL_StatusTypeDef HAL_PCDEx_PMAConfig(PCD_HandleTypeDef *hpcd, uint16_t ep_addr, |
| 82 | uint16_t ep_addr, |
- | |
| 83 | uint16_t ep_kind, |
- | |
| 84 | uint32_t pmaadress) |
82 | uint16_t ep_kind, uint32_t pmaadress) |
| 85 | { |
83 | { |
| 86 | PCD_EPTypeDef *ep; |
84 | PCD_EPTypeDef *ep; |
| 87 | 85 | ||
| 88 | /* initialize ep structure*/ |
86 | /* initialize ep structure*/ |
| 89 | if ((0x80U & ep_addr) == 0x80U) |
87 | if ((0x80U & ep_addr) == 0x80U) |
| Line 160... | Line 158... | ||
| 160 | void HAL_PCDEx_BCD_VBUSDetect(PCD_HandleTypeDef *hpcd) |
158 | void HAL_PCDEx_BCD_VBUSDetect(PCD_HandleTypeDef *hpcd) |
| 161 | { |
159 | { |
| 162 | USB_TypeDef *USBx = hpcd->Instance; |
160 | USB_TypeDef *USBx = hpcd->Instance; |
| 163 | uint32_t tickstart = HAL_GetTick(); |
161 | uint32_t tickstart = HAL_GetTick(); |
| 164 | 162 | ||
| 165 | /* Wait Detect flag or a timeout is happen*/ |
163 | /* Wait Detect flag or a timeout is happen */ |
| 166 | while ((USBx->BCDR & USB_BCDR_DCDET) == 0U) |
164 | while ((USBx->BCDR & USB_BCDR_DCDET) == 0U) |
| 167 | { |
165 | { |
| 168 | /* Check for the Timeout */ |
166 | /* Check for the Timeout */ |
| 169 | if ((HAL_GetTick() - tickstart) > 1000U) |
167 | if ((HAL_GetTick() - tickstart) > 1000U) |
| 170 | { |
168 | { |