mbed library sources
Dependents: frdm_kl05z_gpio_test
Fork of mbed-src by
targets/cmsis/TARGET_STM/TARGET_NUCLEO_F401RE/stm32f4xx_hal_dma_ex.c@323:9e901b0a5aa1, 2014-09-13 (annotated)
- Committer:
- shaoziyang
- Date:
- Sat Sep 13 14:25:46 2014 +0000
- Revision:
- 323:9e901b0a5aa1
- Parent:
- 226:b062af740e40
test with CLOCK_SETUP = 0
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 87:085cde657901 | 1 | /** |
mbed_official | 87:085cde657901 | 2 | ****************************************************************************** |
mbed_official | 87:085cde657901 | 3 | * @file stm32f4xx_hal_dma_ex.c |
mbed_official | 87:085cde657901 | 4 | * @author MCD Application Team |
mbed_official | 226:b062af740e40 | 5 | * @version V1.1.0RC2 |
mbed_official | 226:b062af740e40 | 6 | * @date 14-May-2014 |
mbed_official | 87:085cde657901 | 7 | * @brief DMA Extension HAL module driver |
mbed_official | 87:085cde657901 | 8 | * This file provides firmware functions to manage the following |
mbed_official | 87:085cde657901 | 9 | * functionalities of the DMA Extension peripheral: |
mbed_official | 87:085cde657901 | 10 | * + Extended features functions |
mbed_official | 87:085cde657901 | 11 | * |
mbed_official | 87:085cde657901 | 12 | @verbatim |
mbed_official | 87:085cde657901 | 13 | ============================================================================== |
mbed_official | 87:085cde657901 | 14 | ##### How to use this driver ##### |
mbed_official | 87:085cde657901 | 15 | ============================================================================== |
mbed_official | 87:085cde657901 | 16 | [..] |
mbed_official | 87:085cde657901 | 17 | The DMA Extension HAL driver can be used as follows: |
mbed_official | 87:085cde657901 | 18 | (#) Start a multi buffer transfer using the HAL_DMA_MultiBufferStart() function |
mbed_official | 87:085cde657901 | 19 | for polling mode or HAL_DMA_MultiBufferStart_IT() for interrupt mode. |
mbed_official | 87:085cde657901 | 20 | |
mbed_official | 87:085cde657901 | 21 | -@- In Memory-to-Memory transfer mode, Multi (Double) Buffer mode is not allowed. |
mbed_official | 87:085cde657901 | 22 | -@- When Multi (Double) Buffer mode is enabled the, transfer is circular by default. |
mbed_official | 87:085cde657901 | 23 | -@- In Multi (Double) buffer mode, it is possible to update the base address for |
mbed_official | 226:b062af740e40 | 24 | the AHB memory port on the fly (DMA_SxM0AR or DMA_SxM1AR) when the stream is enabled. |
mbed_official | 87:085cde657901 | 25 | |
mbed_official | 87:085cde657901 | 26 | @endverbatim |
mbed_official | 87:085cde657901 | 27 | ****************************************************************************** |
mbed_official | 87:085cde657901 | 28 | * @attention |
mbed_official | 87:085cde657901 | 29 | * |
mbed_official | 87:085cde657901 | 30 | * <h2><center>© COPYRIGHT(c) 2014 STMicroelectronics</center></h2> |
mbed_official | 87:085cde657901 | 31 | * |
mbed_official | 87:085cde657901 | 32 | * Redistribution and use in source and binary forms, with or without modification, |
mbed_official | 87:085cde657901 | 33 | * are permitted provided that the following conditions are met: |
mbed_official | 87:085cde657901 | 34 | * 1. Redistributions of source code must retain the above copyright notice, |
mbed_official | 87:085cde657901 | 35 | * this list of conditions and the following disclaimer. |
mbed_official | 87:085cde657901 | 36 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
mbed_official | 87:085cde657901 | 37 | * this list of conditions and the following disclaimer in the documentation |
mbed_official | 87:085cde657901 | 38 | * and/or other materials provided with the distribution. |
mbed_official | 87:085cde657901 | 39 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
mbed_official | 87:085cde657901 | 40 | * may be used to endorse or promote products derived from this software |
mbed_official | 87:085cde657901 | 41 | * without specific prior written permission. |
mbed_official | 87:085cde657901 | 42 | * |
mbed_official | 87:085cde657901 | 43 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
mbed_official | 87:085cde657901 | 44 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
mbed_official | 87:085cde657901 | 45 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
mbed_official | 87:085cde657901 | 46 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
mbed_official | 87:085cde657901 | 47 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
mbed_official | 87:085cde657901 | 48 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
mbed_official | 87:085cde657901 | 49 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
mbed_official | 87:085cde657901 | 50 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
mbed_official | 87:085cde657901 | 51 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
mbed_official | 87:085cde657901 | 52 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
mbed_official | 87:085cde657901 | 53 | * |
mbed_official | 87:085cde657901 | 54 | ****************************************************************************** |
mbed_official | 87:085cde657901 | 55 | */ |
mbed_official | 87:085cde657901 | 56 | |
mbed_official | 87:085cde657901 | 57 | /* Includes ------------------------------------------------------------------*/ |
mbed_official | 87:085cde657901 | 58 | #include "stm32f4xx_hal.h" |
mbed_official | 87:085cde657901 | 59 | |
mbed_official | 87:085cde657901 | 60 | /** @addtogroup STM32F4xx_HAL_Driver |
mbed_official | 87:085cde657901 | 61 | * @{ |
mbed_official | 87:085cde657901 | 62 | */ |
mbed_official | 87:085cde657901 | 63 | |
mbed_official | 87:085cde657901 | 64 | /** @defgroup DMAEx |
mbed_official | 87:085cde657901 | 65 | * @brief DMA Extended HAL module driver |
mbed_official | 87:085cde657901 | 66 | * @{ |
mbed_official | 87:085cde657901 | 67 | */ |
mbed_official | 87:085cde657901 | 68 | |
mbed_official | 87:085cde657901 | 69 | #ifdef HAL_DMA_MODULE_ENABLED |
mbed_official | 87:085cde657901 | 70 | |
mbed_official | 87:085cde657901 | 71 | /* Private typedef -----------------------------------------------------------*/ |
mbed_official | 87:085cde657901 | 72 | /* Private define ------------------------------------------------------------*/ |
mbed_official | 87:085cde657901 | 73 | /* Private macro -------------------------------------------------------------*/ |
mbed_official | 87:085cde657901 | 74 | /* Private variables ---------------------------------------------------------*/ |
mbed_official | 87:085cde657901 | 75 | /* Private function prototypes -----------------------------------------------*/ |
mbed_official | 87:085cde657901 | 76 | static void DMA_MultiBufferSetConfig(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t DataLength); |
mbed_official | 87:085cde657901 | 77 | |
mbed_official | 87:085cde657901 | 78 | /* Private functions ---------------------------------------------------------*/ |
mbed_official | 87:085cde657901 | 79 | |
mbed_official | 87:085cde657901 | 80 | /** @defgroup DMAEx_Private_Functions |
mbed_official | 87:085cde657901 | 81 | * @{ |
mbed_official | 87:085cde657901 | 82 | */ |
mbed_official | 87:085cde657901 | 83 | |
mbed_official | 87:085cde657901 | 84 | |
mbed_official | 87:085cde657901 | 85 | /** @defgroup DMAEx_Group1 Extended features functions |
mbed_official | 87:085cde657901 | 86 | * @brief Extended features functions |
mbed_official | 87:085cde657901 | 87 | * |
mbed_official | 87:085cde657901 | 88 | @verbatim |
mbed_official | 87:085cde657901 | 89 | =============================================================================== |
mbed_official | 87:085cde657901 | 90 | ##### Extended features functions ##### |
mbed_official | 87:085cde657901 | 91 | =============================================================================== |
mbed_official | 87:085cde657901 | 92 | [..] This section provides functions allowing to: |
mbed_official | 87:085cde657901 | 93 | (+) Configure the source, destination address and data length and |
mbed_official | 87:085cde657901 | 94 | Start MultiBuffer DMA transfer |
mbed_official | 87:085cde657901 | 95 | (+) Configure the source, destination address and data length and |
mbed_official | 87:085cde657901 | 96 | Start MultiBuffer DMA transfer with interrupt |
mbed_official | 87:085cde657901 | 97 | (+) Change on the fly the memory0 or memory1 address. |
mbed_official | 87:085cde657901 | 98 | |
mbed_official | 87:085cde657901 | 99 | @endverbatim |
mbed_official | 87:085cde657901 | 100 | * @{ |
mbed_official | 87:085cde657901 | 101 | */ |
mbed_official | 87:085cde657901 | 102 | |
mbed_official | 87:085cde657901 | 103 | |
mbed_official | 87:085cde657901 | 104 | /** |
mbed_official | 87:085cde657901 | 105 | * @brief Starts the multi_buffer DMA Transfer. |
mbed_official | 87:085cde657901 | 106 | * @param hdma : pointer to a DMA_HandleTypeDef structure that contains |
mbed_official | 87:085cde657901 | 107 | * the configuration information for the specified DMA Stream. |
mbed_official | 87:085cde657901 | 108 | * @param SrcAddress: The source memory Buffer address |
mbed_official | 87:085cde657901 | 109 | * @param DstAddress: The destination memory Buffer address |
mbed_official | 87:085cde657901 | 110 | * @param SecondMemAddress: The second memory Buffer address in case of multi buffer Transfer |
mbed_official | 87:085cde657901 | 111 | * @param DataLength: The length of data to be transferred from source to destination |
mbed_official | 87:085cde657901 | 112 | * @retval HAL status |
mbed_official | 87:085cde657901 | 113 | */ |
mbed_official | 87:085cde657901 | 114 | HAL_StatusTypeDef HAL_DMAEx_MultiBufferStart(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t SecondMemAddress, uint32_t DataLength) |
mbed_official | 87:085cde657901 | 115 | { |
mbed_official | 87:085cde657901 | 116 | /* Process Locked */ |
mbed_official | 87:085cde657901 | 117 | __HAL_LOCK(hdma); |
mbed_official | 87:085cde657901 | 118 | |
mbed_official | 87:085cde657901 | 119 | /* Current memory buffer used is Memory 0 */ |
mbed_official | 87:085cde657901 | 120 | if((hdma->Instance->CR & DMA_SxCR_CT) == 0) |
mbed_official | 87:085cde657901 | 121 | { |
mbed_official | 87:085cde657901 | 122 | hdma->State = HAL_DMA_STATE_BUSY_MEM0; |
mbed_official | 87:085cde657901 | 123 | } |
mbed_official | 87:085cde657901 | 124 | /* Current memory buffer used is Memory 1 */ |
mbed_official | 87:085cde657901 | 125 | else if((hdma->Instance->CR & DMA_SxCR_CT) != 0) |
mbed_official | 87:085cde657901 | 126 | { |
mbed_official | 87:085cde657901 | 127 | hdma->State = HAL_DMA_STATE_BUSY_MEM1; |
mbed_official | 87:085cde657901 | 128 | } |
mbed_official | 87:085cde657901 | 129 | |
mbed_official | 87:085cde657901 | 130 | /* Check the parameters */ |
mbed_official | 87:085cde657901 | 131 | assert_param(IS_DMA_BUFFER_SIZE(DataLength)); |
mbed_official | 87:085cde657901 | 132 | |
mbed_official | 87:085cde657901 | 133 | /* Disable the peripheral */ |
mbed_official | 87:085cde657901 | 134 | __HAL_DMA_DISABLE(hdma); |
mbed_official | 87:085cde657901 | 135 | |
mbed_official | 87:085cde657901 | 136 | /* Enable the double buffer mode */ |
mbed_official | 87:085cde657901 | 137 | hdma->Instance->CR |= (uint32_t)DMA_SxCR_DBM; |
mbed_official | 87:085cde657901 | 138 | |
mbed_official | 87:085cde657901 | 139 | /* Configure DMA Stream destination address */ |
mbed_official | 87:085cde657901 | 140 | hdma->Instance->M1AR = SecondMemAddress; |
mbed_official | 87:085cde657901 | 141 | |
mbed_official | 87:085cde657901 | 142 | /* Configure the source, destination address and the data length */ |
mbed_official | 87:085cde657901 | 143 | DMA_MultiBufferSetConfig(hdma, SrcAddress, DstAddress, DataLength); |
mbed_official | 87:085cde657901 | 144 | |
mbed_official | 87:085cde657901 | 145 | /* Enable the peripheral */ |
mbed_official | 87:085cde657901 | 146 | __HAL_DMA_ENABLE(hdma); |
mbed_official | 87:085cde657901 | 147 | |
mbed_official | 87:085cde657901 | 148 | return HAL_OK; |
mbed_official | 87:085cde657901 | 149 | } |
mbed_official | 87:085cde657901 | 150 | |
mbed_official | 87:085cde657901 | 151 | /** |
mbed_official | 87:085cde657901 | 152 | * @brief Starts the multi_buffer DMA Transfer with interrupt enabled. |
mbed_official | 87:085cde657901 | 153 | * @param hdma: pointer to a DMA_HandleTypeDef structure that contains |
mbed_official | 87:085cde657901 | 154 | * the configuration information for the specified DMA Stream. |
mbed_official | 87:085cde657901 | 155 | * @param SrcAddress: The source memory Buffer address |
mbed_official | 87:085cde657901 | 156 | * @param DstAddress: The destination memory Buffer address |
mbed_official | 87:085cde657901 | 157 | * @param SecondMemAddress: The second memory Buffer address in case of multi buffer Transfer |
mbed_official | 87:085cde657901 | 158 | * @param DataLength: The length of data to be transferred from source to destination |
mbed_official | 87:085cde657901 | 159 | * @retval HAL status |
mbed_official | 87:085cde657901 | 160 | */ |
mbed_official | 87:085cde657901 | 161 | HAL_StatusTypeDef HAL_DMAEx_MultiBufferStart_IT(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t SecondMemAddress, uint32_t DataLength) |
mbed_official | 87:085cde657901 | 162 | { |
mbed_official | 87:085cde657901 | 163 | /* Process Locked */ |
mbed_official | 87:085cde657901 | 164 | __HAL_LOCK(hdma); |
mbed_official | 87:085cde657901 | 165 | |
mbed_official | 87:085cde657901 | 166 | /* Current memory buffer used is Memory 0 */ |
mbed_official | 87:085cde657901 | 167 | if((hdma->Instance->CR & DMA_SxCR_CT) == 0) |
mbed_official | 87:085cde657901 | 168 | { |
mbed_official | 87:085cde657901 | 169 | hdma->State = HAL_DMA_STATE_BUSY_MEM0; |
mbed_official | 87:085cde657901 | 170 | } |
mbed_official | 87:085cde657901 | 171 | /* Current memory buffer used is Memory 1 */ |
mbed_official | 87:085cde657901 | 172 | else if((hdma->Instance->CR & DMA_SxCR_CT) != 0) |
mbed_official | 87:085cde657901 | 173 | { |
mbed_official | 87:085cde657901 | 174 | hdma->State = HAL_DMA_STATE_BUSY_MEM1; |
mbed_official | 87:085cde657901 | 175 | } |
mbed_official | 87:085cde657901 | 176 | |
mbed_official | 87:085cde657901 | 177 | /* Check the parameters */ |
mbed_official | 87:085cde657901 | 178 | assert_param(IS_DMA_BUFFER_SIZE(DataLength)); |
mbed_official | 87:085cde657901 | 179 | |
mbed_official | 87:085cde657901 | 180 | /* Disable the peripheral */ |
mbed_official | 87:085cde657901 | 181 | __HAL_DMA_DISABLE(hdma); |
mbed_official | 87:085cde657901 | 182 | |
mbed_official | 87:085cde657901 | 183 | /* Enable the Double buffer mode */ |
mbed_official | 87:085cde657901 | 184 | hdma->Instance->CR |= (uint32_t)DMA_SxCR_DBM; |
mbed_official | 87:085cde657901 | 185 | |
mbed_official | 87:085cde657901 | 186 | /* Configure DMA Stream destination address */ |
mbed_official | 87:085cde657901 | 187 | hdma->Instance->M1AR = SecondMemAddress; |
mbed_official | 87:085cde657901 | 188 | |
mbed_official | 87:085cde657901 | 189 | /* Configure the source, destination address and the data length */ |
mbed_official | 87:085cde657901 | 190 | DMA_MultiBufferSetConfig(hdma, SrcAddress, DstAddress, DataLength); |
mbed_official | 87:085cde657901 | 191 | |
mbed_official | 87:085cde657901 | 192 | /* Enable the transfer complete interrupt */ |
mbed_official | 87:085cde657901 | 193 | __HAL_DMA_ENABLE_IT(hdma, DMA_IT_TC); |
mbed_official | 87:085cde657901 | 194 | |
mbed_official | 87:085cde657901 | 195 | /* Enable the Half transfer interrupt */ |
mbed_official | 87:085cde657901 | 196 | __HAL_DMA_ENABLE_IT(hdma, DMA_IT_HT); |
mbed_official | 87:085cde657901 | 197 | |
mbed_official | 87:085cde657901 | 198 | /* Enable the transfer Error interrupt */ |
mbed_official | 87:085cde657901 | 199 | __HAL_DMA_ENABLE_IT(hdma, DMA_IT_TE); |
mbed_official | 87:085cde657901 | 200 | |
mbed_official | 87:085cde657901 | 201 | /* Enable the fifo Error interrupt */ |
mbed_official | 87:085cde657901 | 202 | __HAL_DMA_ENABLE_IT(hdma, DMA_IT_FE); |
mbed_official | 87:085cde657901 | 203 | |
mbed_official | 87:085cde657901 | 204 | /* Enable the direct mode Error interrupt */ |
mbed_official | 87:085cde657901 | 205 | __HAL_DMA_ENABLE_IT(hdma, DMA_IT_DME); |
mbed_official | 87:085cde657901 | 206 | |
mbed_official | 87:085cde657901 | 207 | /* Enable the peripheral */ |
mbed_official | 87:085cde657901 | 208 | __HAL_DMA_ENABLE(hdma); |
mbed_official | 87:085cde657901 | 209 | |
mbed_official | 87:085cde657901 | 210 | return HAL_OK; |
mbed_official | 87:085cde657901 | 211 | } |
mbed_official | 87:085cde657901 | 212 | |
mbed_official | 87:085cde657901 | 213 | /** |
mbed_official | 87:085cde657901 | 214 | * @brief Change the memory0 or memory1 address on the fly. |
mbed_official | 87:085cde657901 | 215 | * @param hdma: pointer to a DMA_HandleTypeDef structure that contains |
mbed_official | 87:085cde657901 | 216 | * the configuration information for the specified DMA Stream. |
mbed_official | 87:085cde657901 | 217 | * @param Address: The new address |
mbed_official | 87:085cde657901 | 218 | * @param memory: the memory to be changed, This parameter can be one of |
mbed_official | 87:085cde657901 | 219 | * the following values: |
mbed_official | 226:b062af740e40 | 220 | * MEMORY0 / |
mbed_official | 226:b062af740e40 | 221 | * MEMORY1 |
mbed_official | 87:085cde657901 | 222 | * @note The MEMORY0 address can be changed only when the current transfer use |
mbed_official | 87:085cde657901 | 223 | * MEMORY1 and the MEMORY1 address can be changed only when the current |
mbed_official | 87:085cde657901 | 224 | * transfer use MEMORY0. |
mbed_official | 87:085cde657901 | 225 | * @retval HAL status |
mbed_official | 87:085cde657901 | 226 | */ |
mbed_official | 87:085cde657901 | 227 | HAL_StatusTypeDef HAL_DMAEx_ChangeMemory(DMA_HandleTypeDef *hdma, uint32_t Address, HAL_DMA_MemoryTypeDef memory) |
mbed_official | 87:085cde657901 | 228 | { |
mbed_official | 87:085cde657901 | 229 | if(memory == MEMORY0) |
mbed_official | 87:085cde657901 | 230 | { |
mbed_official | 87:085cde657901 | 231 | /* change the memory0 address */ |
mbed_official | 87:085cde657901 | 232 | hdma->Instance->M0AR = Address; |
mbed_official | 87:085cde657901 | 233 | } |
mbed_official | 87:085cde657901 | 234 | else |
mbed_official | 87:085cde657901 | 235 | { |
mbed_official | 87:085cde657901 | 236 | /* change the memory1 address */ |
mbed_official | 87:085cde657901 | 237 | hdma->Instance->M1AR = Address; |
mbed_official | 87:085cde657901 | 238 | } |
mbed_official | 87:085cde657901 | 239 | |
mbed_official | 87:085cde657901 | 240 | return HAL_OK; |
mbed_official | 87:085cde657901 | 241 | } |
mbed_official | 87:085cde657901 | 242 | |
mbed_official | 87:085cde657901 | 243 | /** |
mbed_official | 87:085cde657901 | 244 | * @} |
mbed_official | 87:085cde657901 | 245 | */ |
mbed_official | 87:085cde657901 | 246 | |
mbed_official | 87:085cde657901 | 247 | /** |
mbed_official | 87:085cde657901 | 248 | * @brief Set the DMA Transfer parameter. |
mbed_official | 87:085cde657901 | 249 | * @param hdma: pointer to a DMA_HandleTypeDef structure that contains |
mbed_official | 87:085cde657901 | 250 | * the configuration information for the specified DMA Stream. |
mbed_official | 87:085cde657901 | 251 | * @param SrcAddress: The source memory Buffer address |
mbed_official | 87:085cde657901 | 252 | * @param DstAddress: The destination memory Buffer address |
mbed_official | 87:085cde657901 | 253 | * @param DataLength: The length of data to be transferred from source to destination |
mbed_official | 87:085cde657901 | 254 | * @retval HAL status |
mbed_official | 87:085cde657901 | 255 | */ |
mbed_official | 87:085cde657901 | 256 | static void DMA_MultiBufferSetConfig(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t DataLength) |
mbed_official | 87:085cde657901 | 257 | { |
mbed_official | 87:085cde657901 | 258 | /* Configure DMA Stream data length */ |
mbed_official | 87:085cde657901 | 259 | hdma->Instance->NDTR = DataLength; |
mbed_official | 87:085cde657901 | 260 | |
mbed_official | 87:085cde657901 | 261 | /* Peripheral to Memory */ |
mbed_official | 87:085cde657901 | 262 | if((hdma->Init.Direction) == DMA_MEMORY_TO_PERIPH) |
mbed_official | 87:085cde657901 | 263 | { |
mbed_official | 87:085cde657901 | 264 | /* Configure DMA Stream destination address */ |
mbed_official | 87:085cde657901 | 265 | hdma->Instance->PAR = DstAddress; |
mbed_official | 87:085cde657901 | 266 | |
mbed_official | 87:085cde657901 | 267 | /* Configure DMA Stream source address */ |
mbed_official | 87:085cde657901 | 268 | hdma->Instance->M0AR = SrcAddress; |
mbed_official | 87:085cde657901 | 269 | } |
mbed_official | 87:085cde657901 | 270 | /* Memory to Peripheral */ |
mbed_official | 87:085cde657901 | 271 | else |
mbed_official | 87:085cde657901 | 272 | { |
mbed_official | 87:085cde657901 | 273 | /* Configure DMA Stream source address */ |
mbed_official | 87:085cde657901 | 274 | hdma->Instance->PAR = SrcAddress; |
mbed_official | 87:085cde657901 | 275 | |
mbed_official | 87:085cde657901 | 276 | /* Configure DMA Stream destination address */ |
mbed_official | 87:085cde657901 | 277 | hdma->Instance->M0AR = DstAddress; |
mbed_official | 87:085cde657901 | 278 | } |
mbed_official | 87:085cde657901 | 279 | } |
mbed_official | 87:085cde657901 | 280 | |
mbed_official | 87:085cde657901 | 281 | /** |
mbed_official | 87:085cde657901 | 282 | * @} |
mbed_official | 87:085cde657901 | 283 | */ |
mbed_official | 87:085cde657901 | 284 | |
mbed_official | 87:085cde657901 | 285 | #endif /* HAL_DMA_MODULE_ENABLED */ |
mbed_official | 87:085cde657901 | 286 | /** |
mbed_official | 87:085cde657901 | 287 | * @} |
mbed_official | 87:085cde657901 | 288 | */ |
mbed_official | 87:085cde657901 | 289 | |
mbed_official | 87:085cde657901 | 290 | /** |
mbed_official | 87:085cde657901 | 291 | * @} |
mbed_official | 87:085cde657901 | 292 | */ |
mbed_official | 87:085cde657901 | 293 | |
mbed_official | 87:085cde657901 | 294 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |