cc y / mbed

Fork of mbed by mbed official

Committer:
Kojto
Date:
Thu Jul 07 14:34:11 2016 +0100
Revision:
122:f9eeca106725
Parent:
116:c0f6e94411f5
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?

UserRevisionLine numberNew contents of line
Kojto 115:87f2f5183dfb 1 /**
Kojto 115:87f2f5183dfb 2 ******************************************************************************
Kojto 115:87f2f5183dfb 3 * @file stm32f7xx_hal_dma_ex.h
Kojto 115:87f2f5183dfb 4 * @author MCD Application Team
Kojto 122:f9eeca106725 5 * @version V1.1.0
Kojto 122:f9eeca106725 6 * @date 22-April-2016
Kojto 115:87f2f5183dfb 7 * @brief Header file of DMA HAL extension module.
Kojto 115:87f2f5183dfb 8 ******************************************************************************
Kojto 115:87f2f5183dfb 9 * @attention
Kojto 115:87f2f5183dfb 10 *
Kojto 122:f9eeca106725 11 * <h2><center>&copy; COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
Kojto 115:87f2f5183dfb 12 *
Kojto 115:87f2f5183dfb 13 * Redistribution and use in source and binary forms, with or without modification,
Kojto 115:87f2f5183dfb 14 * are permitted provided that the following conditions are met:
Kojto 115:87f2f5183dfb 15 * 1. Redistributions of source code must retain the above copyright notice,
Kojto 115:87f2f5183dfb 16 * this list of conditions and the following disclaimer.
Kojto 115:87f2f5183dfb 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
Kojto 115:87f2f5183dfb 18 * this list of conditions and the following disclaimer in the documentation
Kojto 115:87f2f5183dfb 19 * and/or other materials provided with the distribution.
Kojto 115:87f2f5183dfb 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
Kojto 115:87f2f5183dfb 21 * may be used to endorse or promote products derived from this software
Kojto 115:87f2f5183dfb 22 * without specific prior written permission.
Kojto 115:87f2f5183dfb 23 *
Kojto 115:87f2f5183dfb 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
Kojto 115:87f2f5183dfb 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Kojto 115:87f2f5183dfb 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
Kojto 115:87f2f5183dfb 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
Kojto 115:87f2f5183dfb 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
Kojto 115:87f2f5183dfb 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
Kojto 115:87f2f5183dfb 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
Kojto 115:87f2f5183dfb 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
Kojto 115:87f2f5183dfb 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
Kojto 115:87f2f5183dfb 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Kojto 115:87f2f5183dfb 34 *
Kojto 115:87f2f5183dfb 35 ******************************************************************************
Kojto 115:87f2f5183dfb 36 */
Kojto 115:87f2f5183dfb 37
Kojto 115:87f2f5183dfb 38 /* Define to prevent recursive inclusion -------------------------------------*/
Kojto 115:87f2f5183dfb 39 #ifndef __STM32F7xx_HAL_DMA_EX_H
Kojto 115:87f2f5183dfb 40 #define __STM32F7xx_HAL_DMA_EX_H
Kojto 115:87f2f5183dfb 41
Kojto 115:87f2f5183dfb 42 #ifdef __cplusplus
Kojto 115:87f2f5183dfb 43 extern "C" {
Kojto 115:87f2f5183dfb 44 #endif
Kojto 115:87f2f5183dfb 45
Kojto 115:87f2f5183dfb 46 /* Includes ------------------------------------------------------------------*/
Kojto 115:87f2f5183dfb 47 #include "stm32f7xx_hal_def.h"
Kojto 115:87f2f5183dfb 48
Kojto 115:87f2f5183dfb 49 /** @addtogroup STM32F7xx_HAL_Driver
Kojto 115:87f2f5183dfb 50 * @{
Kojto 115:87f2f5183dfb 51 */
Kojto 115:87f2f5183dfb 52
Kojto 115:87f2f5183dfb 53 /** @addtogroup DMAEx
Kojto 115:87f2f5183dfb 54 * @{
Kojto 115:87f2f5183dfb 55 */
Kojto 115:87f2f5183dfb 56
Kojto 115:87f2f5183dfb 57 /* Exported types ------------------------------------------------------------*/
Kojto 115:87f2f5183dfb 58 /** @defgroup DMAEx_Exported_Types DMAEx Exported Types
Kojto 115:87f2f5183dfb 59 * @brief DMAEx Exported types
Kojto 115:87f2f5183dfb 60 * @{
Kojto 115:87f2f5183dfb 61 */
Kojto 115:87f2f5183dfb 62
Kojto 115:87f2f5183dfb 63 /**
Kojto 115:87f2f5183dfb 64 * @brief HAL DMA Memory definition
Kojto 115:87f2f5183dfb 65 */
Kojto 115:87f2f5183dfb 66 typedef enum
Kojto 115:87f2f5183dfb 67 {
Kojto 122:f9eeca106725 68 MEMORY0 = 0x00U, /*!< Memory 0 */
Kojto 122:f9eeca106725 69 MEMORY1 = 0x01U, /*!< Memory 1 */
Kojto 115:87f2f5183dfb 70
Kojto 115:87f2f5183dfb 71 }HAL_DMA_MemoryTypeDef;
Kojto 115:87f2f5183dfb 72
Kojto 115:87f2f5183dfb 73 /**
Kojto 115:87f2f5183dfb 74 * @}
Kojto 115:87f2f5183dfb 75 */
Kojto 122:f9eeca106725 76
Kojto 122:f9eeca106725 77 /* Exported constants --------------------------------------------------------*/
Kojto 122:f9eeca106725 78
Kojto 122:f9eeca106725 79 /** @defgroup DMA_Exported_Constants DMA Exported Constants
Kojto 122:f9eeca106725 80 * @brief DMA Exported constants
Kojto 122:f9eeca106725 81 * @{
Kojto 122:f9eeca106725 82 */
Kojto 122:f9eeca106725 83
Kojto 122:f9eeca106725 84 /** @defgroup DMAEx_Channel_selection DMA Channel selection
Kojto 122:f9eeca106725 85 * @brief DMAEx channel selection
Kojto 122:f9eeca106725 86 * @{
Kojto 122:f9eeca106725 87 */
Kojto 122:f9eeca106725 88 #define DMA_CHANNEL_0 ((uint32_t)0x00000000U) /*!< DMA Channel 0 */
Kojto 122:f9eeca106725 89 #define DMA_CHANNEL_1 ((uint32_t)0x02000000U) /*!< DMA Channel 1 */
Kojto 122:f9eeca106725 90 #define DMA_CHANNEL_2 ((uint32_t)0x04000000U) /*!< DMA Channel 2 */
Kojto 122:f9eeca106725 91 #define DMA_CHANNEL_3 ((uint32_t)0x06000000U) /*!< DMA Channel 3 */
Kojto 122:f9eeca106725 92 #define DMA_CHANNEL_4 ((uint32_t)0x08000000U) /*!< DMA Channel 4 */
Kojto 122:f9eeca106725 93 #define DMA_CHANNEL_5 ((uint32_t)0x0A000000U) /*!< DMA Channel 5 */
Kojto 122:f9eeca106725 94 #define DMA_CHANNEL_6 ((uint32_t)0x0C000000U) /*!< DMA Channel 6 */
Kojto 122:f9eeca106725 95 #define DMA_CHANNEL_7 ((uint32_t)0x0E000000U) /*!< DMA Channel 7 */
Kojto 122:f9eeca106725 96 #if defined (STM32F765xx) || defined(STM32F767xx) || defined(STM32F769xx) || defined(STM32F777xx) || defined(STM32F779xx)
Kojto 122:f9eeca106725 97 #define DMA_CHANNEL_8 ((uint32_t)0x10000000U) /*!< DMA Channel 8 */
Kojto 122:f9eeca106725 98 #define DMA_CHANNEL_9 ((uint32_t)0x12000000U) /*!< DMA Channel 9 */
Kojto 122:f9eeca106725 99 #define DMA_CHANNEL_10 ((uint32_t)0x14000000U) /*!< DMA Channel 10*/
Kojto 122:f9eeca106725 100 #define DMA_CHANNEL_11 ((uint32_t)0x16000000U) /*!< DMA Channel 11*/
Kojto 122:f9eeca106725 101 #define DMA_CHANNEL_12 ((uint32_t)0x18000000U) /*!< DMA Channel 12*/
Kojto 122:f9eeca106725 102 #define DMA_CHANNEL_13 ((uint32_t)0x1A000000U) /*!< DMA Channel 13*/
Kojto 122:f9eeca106725 103 #define DMA_CHANNEL_14 ((uint32_t)0x1C000000U) /*!< DMA Channel 14*/
Kojto 122:f9eeca106725 104 #define DMA_CHANNEL_15 ((uint32_t)0x1E000000U) /*!< DMA Channel 15*/
Kojto 122:f9eeca106725 105 #endif /* STM32F765xx || STM32F767xx || STM32F769xx || STM32F777xx || STM32F779xx */
Kojto 122:f9eeca106725 106
Kojto 122:f9eeca106725 107 /**
Kojto 122:f9eeca106725 108 * @}
Kojto 122:f9eeca106725 109 */
Kojto 122:f9eeca106725 110
Kojto 122:f9eeca106725 111 /**
Kojto 122:f9eeca106725 112 * @}
Kojto 122:f9eeca106725 113 */
Kojto 115:87f2f5183dfb 114
Kojto 115:87f2f5183dfb 115 /* Exported functions --------------------------------------------------------*/
Kojto 115:87f2f5183dfb 116 /** @defgroup DMAEx_Exported_Functions DMAEx Exported Functions
Kojto 115:87f2f5183dfb 117 * @brief DMAEx Exported functions
Kojto 115:87f2f5183dfb 118 * @{
Kojto 115:87f2f5183dfb 119 */
Kojto 115:87f2f5183dfb 120
Kojto 115:87f2f5183dfb 121 /** @defgroup DMAEx_Exported_Functions_Group1 Extended features functions
Kojto 115:87f2f5183dfb 122 * @brief Extended features functions
Kojto 115:87f2f5183dfb 123 * @{
Kojto 115:87f2f5183dfb 124 */
Kojto 115:87f2f5183dfb 125
Kojto 115:87f2f5183dfb 126 /* IO operation functions *******************************************************/
Kojto 115:87f2f5183dfb 127 HAL_StatusTypeDef HAL_DMAEx_MultiBufferStart(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t SecondMemAddress, uint32_t DataLength);
Kojto 115:87f2f5183dfb 128 HAL_StatusTypeDef HAL_DMAEx_MultiBufferStart_IT(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t SecondMemAddress, uint32_t DataLength);
Kojto 115:87f2f5183dfb 129 HAL_StatusTypeDef HAL_DMAEx_ChangeMemory(DMA_HandleTypeDef *hdma, uint32_t Address, HAL_DMA_MemoryTypeDef memory);
Kojto 115:87f2f5183dfb 130
Kojto 115:87f2f5183dfb 131 /**
Kojto 115:87f2f5183dfb 132 * @}
Kojto 115:87f2f5183dfb 133 */
Kojto 115:87f2f5183dfb 134 /**
Kojto 115:87f2f5183dfb 135 * @}
Kojto 115:87f2f5183dfb 136 */
Kojto 122:f9eeca106725 137
Kojto 122:f9eeca106725 138 /* Private macros ------------------------------------------------------------*/
Kojto 122:f9eeca106725 139 /** @defgroup DMAEx_Private_Macros DMA Private Macros
Kojto 122:f9eeca106725 140 * @brief DMAEx private macros
Kojto 122:f9eeca106725 141 * @{
Kojto 122:f9eeca106725 142 */
Kojto 122:f9eeca106725 143 #if defined (STM32F765xx) || defined(STM32F767xx) || defined(STM32F769xx) || defined(STM32F777xx) || defined(STM32F779xx)
Kojto 122:f9eeca106725 144 #define IS_DMA_CHANNEL(CHANNEL) (((CHANNEL) == DMA_CHANNEL_0) || \
Kojto 122:f9eeca106725 145 ((CHANNEL) == DMA_CHANNEL_1) || \
Kojto 122:f9eeca106725 146 ((CHANNEL) == DMA_CHANNEL_2) || \
Kojto 122:f9eeca106725 147 ((CHANNEL) == DMA_CHANNEL_3) || \
Kojto 122:f9eeca106725 148 ((CHANNEL) == DMA_CHANNEL_4) || \
Kojto 122:f9eeca106725 149 ((CHANNEL) == DMA_CHANNEL_5) || \
Kojto 122:f9eeca106725 150 ((CHANNEL) == DMA_CHANNEL_6) || \
Kojto 122:f9eeca106725 151 ((CHANNEL) == DMA_CHANNEL_7) || \
Kojto 122:f9eeca106725 152 ((CHANNEL) == DMA_CHANNEL_8) || \
Kojto 122:f9eeca106725 153 ((CHANNEL) == DMA_CHANNEL_9) || \
Kojto 122:f9eeca106725 154 ((CHANNEL) == DMA_CHANNEL_10) || \
Kojto 122:f9eeca106725 155 ((CHANNEL) == DMA_CHANNEL_11) || \
Kojto 122:f9eeca106725 156 ((CHANNEL) == DMA_CHANNEL_12) || \
Kojto 122:f9eeca106725 157 ((CHANNEL) == DMA_CHANNEL_13) || \
Kojto 122:f9eeca106725 158 ((CHANNEL) == DMA_CHANNEL_14) || \
Kojto 122:f9eeca106725 159 ((CHANNEL) == DMA_CHANNEL_15))
Kojto 122:f9eeca106725 160 #else
Kojto 122:f9eeca106725 161 #define IS_DMA_CHANNEL(CHANNEL) (((CHANNEL) == DMA_CHANNEL_0) || \
Kojto 122:f9eeca106725 162 ((CHANNEL) == DMA_CHANNEL_1) || \
Kojto 122:f9eeca106725 163 ((CHANNEL) == DMA_CHANNEL_2) || \
Kojto 122:f9eeca106725 164 ((CHANNEL) == DMA_CHANNEL_3) || \
Kojto 122:f9eeca106725 165 ((CHANNEL) == DMA_CHANNEL_4) || \
Kojto 122:f9eeca106725 166 ((CHANNEL) == DMA_CHANNEL_5) || \
Kojto 122:f9eeca106725 167 ((CHANNEL) == DMA_CHANNEL_6) || \
Kojto 122:f9eeca106725 168 ((CHANNEL) == DMA_CHANNEL_7))
Kojto 122:f9eeca106725 169 #endif /* STM32F765xx || STM32F767xx || STM32F769xx || STM32F777xx || STM32F779xx */
Kojto 122:f9eeca106725 170 /**
Kojto 122:f9eeca106725 171 * @}
Kojto 122:f9eeca106725 172 */
Kojto 115:87f2f5183dfb 173
Kojto 115:87f2f5183dfb 174 /* Private functions ---------------------------------------------------------*/
Kojto 115:87f2f5183dfb 175 /** @defgroup DMAEx_Private_Functions DMAEx Private Functions
Kojto 115:87f2f5183dfb 176 * @brief DMAEx Private functions
Kojto 115:87f2f5183dfb 177 * @{
Kojto 115:87f2f5183dfb 178 */
Kojto 115:87f2f5183dfb 179 /**
Kojto 115:87f2f5183dfb 180 * @}
Kojto 115:87f2f5183dfb 181 */
Kojto 115:87f2f5183dfb 182
Kojto 115:87f2f5183dfb 183 /**
Kojto 115:87f2f5183dfb 184 * @}
Kojto 115:87f2f5183dfb 185 */
Kojto 115:87f2f5183dfb 186
Kojto 115:87f2f5183dfb 187 /**
Kojto 115:87f2f5183dfb 188 * @}
Kojto 115:87f2f5183dfb 189 */
Kojto 115:87f2f5183dfb 190
Kojto 115:87f2f5183dfb 191 #ifdef __cplusplus
Kojto 115:87f2f5183dfb 192 }
Kojto 115:87f2f5183dfb 193 #endif
Kojto 115:87f2f5183dfb 194
Kojto 115:87f2f5183dfb 195 #endif /* __STM32F7xx_HAL_DMA_H */
Kojto 115:87f2f5183dfb 196
Kojto 115:87f2f5183dfb 197 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/