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: hello SerialTestv11 SerialTestv12 Sierpinski ... more
TARGET_ARCH_MAX/stm32f4xx_hal_pcd_ex.h@122:f9eeca106725, 2016-07-07 (annotated)
- Committer:
- Kojto
- Date:
- Thu Jul 07 14:34:11 2016 +0100
- Revision:
- 122:f9eeca106725
- Parent:
- 110:165afa46840b
Release 122 of the mbed library
Changes:
- new targets - Nucleo L432KC, Beetle, Nucleo F446ZE, Nucleo L011K4
- Thread safety addition - mbed API should contain a statement about thread safety
- critical section API addition
- CAS API (core_util_atomic_incr/decr)
- DEVICE_ are generated from targets.json file, device.h deprecated
- Callback replaces FunctionPointer to provide std like interface
- mbed HAL API docs improvements
- toolchain - prexif attributes with MBED_
- add new attributes - packed, weak, forcedinline, align
- target.json - contains targets definitions
- ST - L1XX - Cube update to 1.5
- SPI clock selection fix (clock from APB domain)
- F7 - Cube update v1.4.0
- L0 - baudrate init fix
- L1 - Cube update v1.5
- F3 - baudrate init fix, 3 targets CAN support
- F4 - Cube update v1.12.0, 3 targets CAN support
- L4XX - Cube update v1.5.1
- F0 - update Cube to v1.5.0
- L4 - 2 targets (L476RG/VG) CAN support
- NXP - pwm clock fix for KSDK2 MCU
- LPC2368 - remove ARM toolchain support - due to regression
- KSDK2 - fix SPI , I2C address and repeat start
- Silabs - some fixes backported from mbed 3
- Renesas - RZ_A1H - SystemCoreClockUpdate addition
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
bogdanm | 92:4fc01daae5a5 | 1 | /** |
bogdanm | 92:4fc01daae5a5 | 2 | ****************************************************************************** |
bogdanm | 92:4fc01daae5a5 | 3 | * @file stm32f4xx_hal_pcd_ex.h |
bogdanm | 92:4fc01daae5a5 | 4 | * @author MCD Application Team |
Kojto | 122:f9eeca106725 | 5 | * @version V1.5.0 |
Kojto | 122:f9eeca106725 | 6 | * @date 06-May-2016 |
bogdanm | 92:4fc01daae5a5 | 7 | * @brief Header file of PCD HAL module. |
bogdanm | 92:4fc01daae5a5 | 8 | ****************************************************************************** |
bogdanm | 92:4fc01daae5a5 | 9 | * @attention |
bogdanm | 92:4fc01daae5a5 | 10 | * |
Kojto | 122:f9eeca106725 | 11 | * <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2> |
bogdanm | 92:4fc01daae5a5 | 12 | * |
bogdanm | 92:4fc01daae5a5 | 13 | * Redistribution and use in source and binary forms, with or without modification, |
bogdanm | 92:4fc01daae5a5 | 14 | * are permitted provided that the following conditions are met: |
bogdanm | 92:4fc01daae5a5 | 15 | * 1. Redistributions of source code must retain the above copyright notice, |
bogdanm | 92:4fc01daae5a5 | 16 | * this list of conditions and the following disclaimer. |
bogdanm | 92:4fc01daae5a5 | 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
bogdanm | 92:4fc01daae5a5 | 18 | * this list of conditions and the following disclaimer in the documentation |
bogdanm | 92:4fc01daae5a5 | 19 | * and/or other materials provided with the distribution. |
bogdanm | 92:4fc01daae5a5 | 20 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
bogdanm | 92:4fc01daae5a5 | 21 | * may be used to endorse or promote products derived from this software |
bogdanm | 92:4fc01daae5a5 | 22 | * without specific prior written permission. |
bogdanm | 92:4fc01daae5a5 | 23 | * |
bogdanm | 92:4fc01daae5a5 | 24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
bogdanm | 92:4fc01daae5a5 | 25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
bogdanm | 92:4fc01daae5a5 | 26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
bogdanm | 92:4fc01daae5a5 | 27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
bogdanm | 92:4fc01daae5a5 | 28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
bogdanm | 92:4fc01daae5a5 | 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
bogdanm | 92:4fc01daae5a5 | 30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
bogdanm | 92:4fc01daae5a5 | 31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
bogdanm | 92:4fc01daae5a5 | 32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
bogdanm | 92:4fc01daae5a5 | 33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
bogdanm | 92:4fc01daae5a5 | 34 | * |
bogdanm | 92:4fc01daae5a5 | 35 | ****************************************************************************** |
bogdanm | 92:4fc01daae5a5 | 36 | */ |
bogdanm | 92:4fc01daae5a5 | 37 | |
bogdanm | 92:4fc01daae5a5 | 38 | /* Define to prevent recursive inclusion -------------------------------------*/ |
bogdanm | 92:4fc01daae5a5 | 39 | #ifndef __STM32F4xx_HAL_PCD_EX_H |
bogdanm | 92:4fc01daae5a5 | 40 | #define __STM32F4xx_HAL_PCD_EX_H |
bogdanm | 92:4fc01daae5a5 | 41 | |
bogdanm | 92:4fc01daae5a5 | 42 | #ifdef __cplusplus |
bogdanm | 92:4fc01daae5a5 | 43 | extern "C" { |
bogdanm | 92:4fc01daae5a5 | 44 | #endif |
Kojto | 110:165afa46840b | 45 | #if defined(STM32F405xx) || defined(STM32F415xx) || defined(STM32F407xx) || defined(STM32F417xx) || \ |
Kojto | 110:165afa46840b | 46 | defined(STM32F427xx) || defined(STM32F437xx) || defined(STM32F429xx) || defined(STM32F439xx) || \ |
Kojto | 110:165afa46840b | 47 | defined(STM32F401xC) || defined(STM32F401xE) || defined(STM32F411xE) || defined(STM32F446xx) || \ |
Kojto | 122:f9eeca106725 | 48 | defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F412Zx) || defined(STM32F412Vx) || \ |
Kojto | 122:f9eeca106725 | 49 | defined(STM32F412Rx) || defined(STM32F412Cx) |
bogdanm | 92:4fc01daae5a5 | 50 | /* Includes ------------------------------------------------------------------*/ |
bogdanm | 92:4fc01daae5a5 | 51 | #include "stm32f4xx_hal_def.h" |
bogdanm | 92:4fc01daae5a5 | 52 | |
bogdanm | 92:4fc01daae5a5 | 53 | /** @addtogroup STM32F4xx_HAL_Driver |
bogdanm | 92:4fc01daae5a5 | 54 | * @{ |
bogdanm | 92:4fc01daae5a5 | 55 | */ |
bogdanm | 92:4fc01daae5a5 | 56 | |
bogdanm | 92:4fc01daae5a5 | 57 | /** @addtogroup PCDEx |
bogdanm | 92:4fc01daae5a5 | 58 | * @{ |
bogdanm | 92:4fc01daae5a5 | 59 | */ |
Kojto | 99:dbbf35b96557 | 60 | /* Exported types ------------------------------------------------------------*/ |
Kojto | 122:f9eeca106725 | 61 | #if defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F412Zx) || defined(STM32F412Vx) || \ |
Kojto | 122:f9eeca106725 | 62 | defined(STM32F412Rx) || defined(STM32F412Cx) |
Kojto | 99:dbbf35b96557 | 63 | typedef enum |
Kojto | 99:dbbf35b96557 | 64 | { |
Kojto | 122:f9eeca106725 | 65 | PCD_LPM_L0_ACTIVE = 0x00U, /* on */ |
Kojto | 122:f9eeca106725 | 66 | PCD_LPM_L1_ACTIVE = 0x01U /* LPM L1 sleep */ |
Kojto | 99:dbbf35b96557 | 67 | }PCD_LPM_MsgTypeDef; |
Kojto | 122:f9eeca106725 | 68 | #endif /* STM32F446xx || STM32F469xx || STM32F479xx || STM32F412Zx || STM32F412Rx || STM32F412Vx || STM32F412Cx */ |
Kojto | 122:f9eeca106725 | 69 | |
Kojto | 122:f9eeca106725 | 70 | #if defined(STM32F412Zx) || defined(STM32F412Vx) || defined(STM32F412Rx) || defined(STM32F412Cx) |
Kojto | 122:f9eeca106725 | 71 | typedef enum |
Kojto | 122:f9eeca106725 | 72 | { |
Kojto | 122:f9eeca106725 | 73 | PCD_BCD_ERROR = 0xFFU, |
Kojto | 122:f9eeca106725 | 74 | PCD_BCD_CONTACT_DETECTION = 0xFEU, |
Kojto | 122:f9eeca106725 | 75 | PCD_BCD_STD_DOWNSTREAM_PORT = 0xFDU, |
Kojto | 122:f9eeca106725 | 76 | PCD_BCD_CHARGING_DOWNSTREAM_PORT = 0xFCU, |
Kojto | 122:f9eeca106725 | 77 | PCD_BCD_DEDICATED_CHARGING_PORT = 0xFBU, |
Kojto | 122:f9eeca106725 | 78 | PCD_BCD_DISCOVERY_COMPLETED = 0x00U |
Kojto | 122:f9eeca106725 | 79 | }PCD_BCD_MsgTypeDef; |
Kojto | 122:f9eeca106725 | 80 | #endif /* STM32F412Zx || STM32F412Rx || STM32F412Vx || STM32F412Cx */ |
bogdanm | 92:4fc01daae5a5 | 81 | |
Kojto | 99:dbbf35b96557 | 82 | /* Exported constants --------------------------------------------------------*/ |
Kojto | 99:dbbf35b96557 | 83 | /* Exported macros -----------------------------------------------------------*/ |
bogdanm | 92:4fc01daae5a5 | 84 | /* Exported functions --------------------------------------------------------*/ |
Kojto | 110:165afa46840b | 85 | /** @addtogroup PCDEx_Exported_Functions PCD Extended Exported Functions |
Kojto | 99:dbbf35b96557 | 86 | * @{ |
Kojto | 99:dbbf35b96557 | 87 | */ |
Kojto | 99:dbbf35b96557 | 88 | /** @addtogroup PCDEx_Exported_Functions_Group1 Peripheral Control functions |
Kojto | 99:dbbf35b96557 | 89 | * @{ |
Kojto | 99:dbbf35b96557 | 90 | */ |
bogdanm | 92:4fc01daae5a5 | 91 | HAL_StatusTypeDef HAL_PCDEx_SetTxFiFo(PCD_HandleTypeDef *hpcd, uint8_t fifo, uint16_t size); |
bogdanm | 92:4fc01daae5a5 | 92 | HAL_StatusTypeDef HAL_PCDEx_SetRxFiFo(PCD_HandleTypeDef *hpcd, uint16_t size); |
Kojto | 122:f9eeca106725 | 93 | #if defined(STM32F446xx) || defined(STM32F469xx) || defined(STM32F479xx) || defined(STM32F412Zx) || defined(STM32F412Vx) || \ |
Kojto | 122:f9eeca106725 | 94 | defined(STM32F412Rx) || defined(STM32F412Cx) |
Kojto | 99:dbbf35b96557 | 95 | HAL_StatusTypeDef HAL_PCDEx_ActivateLPM(PCD_HandleTypeDef *hpcd); |
Kojto | 99:dbbf35b96557 | 96 | HAL_StatusTypeDef HAL_PCDEx_DeActivateLPM(PCD_HandleTypeDef *hpcd); |
Kojto | 99:dbbf35b96557 | 97 | void HAL_PCDEx_LPM_Callback(PCD_HandleTypeDef *hpcd, PCD_LPM_MsgTypeDef msg); |
Kojto | 122:f9eeca106725 | 98 | #endif /* STM32F446xx || STM32F469xx || STM32F479xx || STM32F412Zx || STM32F412Rx || STM32F412Vx || STM32F412Cx */ |
Kojto | 122:f9eeca106725 | 99 | #if defined(STM32F412Zx) || defined(STM32F412Vx) || defined(STM32F412Rx) || defined(STM32F412Cx) |
Kojto | 122:f9eeca106725 | 100 | HAL_StatusTypeDef HAL_PCDEx_ActivateBCD(PCD_HandleTypeDef *hpcd); |
Kojto | 122:f9eeca106725 | 101 | HAL_StatusTypeDef HAL_PCDEx_DeActivateBCD(PCD_HandleTypeDef *hpcd); |
Kojto | 122:f9eeca106725 | 102 | void HAL_PCDEx_BCD_VBUSDetect(PCD_HandleTypeDef *hpcd); |
Kojto | 122:f9eeca106725 | 103 | void HAL_PCDEx_BCD_Callback(PCD_HandleTypeDef *hpcd, PCD_BCD_MsgTypeDef msg); |
Kojto | 122:f9eeca106725 | 104 | void HAL_PCDEx_ADP_Sensing_Start(PCD_HandleTypeDef *hpcd); |
Kojto | 122:f9eeca106725 | 105 | void HAL_PCDEx_ADP_Sensing_Callback(PCD_HandleTypeDef *hpcd); |
Kojto | 122:f9eeca106725 | 106 | #endif /* STM32F412Zx || STM32F412Rx || STM32F412Vx || STM32F412Cx */ |
bogdanm | 92:4fc01daae5a5 | 107 | |
bogdanm | 92:4fc01daae5a5 | 108 | /** |
bogdanm | 92:4fc01daae5a5 | 109 | * @} |
bogdanm | 92:4fc01daae5a5 | 110 | */ |
bogdanm | 92:4fc01daae5a5 | 111 | |
bogdanm | 92:4fc01daae5a5 | 112 | /** |
bogdanm | 92:4fc01daae5a5 | 113 | * @} |
bogdanm | 92:4fc01daae5a5 | 114 | */ |
bogdanm | 92:4fc01daae5a5 | 115 | |
Kojto | 99:dbbf35b96557 | 116 | /** |
Kojto | 99:dbbf35b96557 | 117 | * @} |
Kojto | 99:dbbf35b96557 | 118 | */ |
Kojto | 99:dbbf35b96557 | 119 | |
Kojto | 99:dbbf35b96557 | 120 | /** |
Kojto | 99:dbbf35b96557 | 121 | * @} |
Kojto | 99:dbbf35b96557 | 122 | */ |
Kojto | 110:165afa46840b | 123 | #endif /* STM32F405xx || STM32F415xx || STM32F407xx || STM32F417xx || STM32F427xx || STM32F437xx || STM32F429xx || STM32F439xx || |
Kojto | 122:f9eeca106725 | 124 | STM32F401xC || STM32F401xE || STM32F411xE || STM32F446xx || STM32F469xx || STM32F479xx || STM32F412Zx || STM32F412Rx || |
Kojto | 122:f9eeca106725 | 125 | STM32F412Vx || STM32F412Cx */ |
bogdanm | 92:4fc01daae5a5 | 126 | #ifdef __cplusplus |
bogdanm | 92:4fc01daae5a5 | 127 | } |
bogdanm | 92:4fc01daae5a5 | 128 | #endif |
bogdanm | 92:4fc01daae5a5 | 129 | |
bogdanm | 92:4fc01daae5a5 | 130 | |
bogdanm | 92:4fc01daae5a5 | 131 | #endif /* __STM32F4xx_HAL_PCD_EX_H */ |
bogdanm | 92:4fc01daae5a5 | 132 | |
bogdanm | 92:4fc01daae5a5 | 133 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |