1 /** 2 ****************************************************************************** 3 * @file stm32f7xx_hal_dma_ex.h 4 * @author MCD Application Team 5 * @brief Header file of DMA HAL extension module. 6 ****************************************************************************** 7 * @attention 8 * 9 * Copyright (c) 2017 STMicroelectronics. 10 * All rights reserved. 11 * 12 * This software is licensed under terms that can be found in the LICENSE file in 13 * the root directory of this software component. 14 * If no LICENSE file comes with this software, it is provided AS-IS. 15 * 16 ****************************************************************************** 17 */ 18 19 /* Define to prevent recursive inclusion -------------------------------------*/ 20 #ifndef __STM32F7xx_HAL_DMA_EX_H 21 #define __STM32F7xx_HAL_DMA_EX_H 22 23 #ifdef __cplusplus 24 extern "C" { 25 #endif 26 27 /* Includes ------------------------------------------------------------------*/ 28 #include "stm32f7xx_hal_def.h" 29 30 /** @addtogroup STM32F7xx_HAL_Driver 31 * @{ 32 */ 33 34 /** @addtogroup DMAEx 35 * @{ 36 */ 37 38 /* Exported types ------------------------------------------------------------*/ 39 /** @defgroup DMAEx_Exported_Types DMAEx Exported Types 40 * @brief DMAEx Exported types 41 * @{ 42 */ 43 44 /** 45 * @brief HAL DMA Memory definition 46 */ 47 typedef enum 48 { 49 MEMORY0 = 0x00U, /*!< Memory 0 */ 50 MEMORY1 = 0x01U, /*!< Memory 1 */ 51 52 }HAL_DMA_MemoryTypeDef; 53 54 /** 55 * @} 56 */ 57 58 /* Exported constants --------------------------------------------------------*/ 59 60 /** @defgroup DMA_Exported_Constants DMA Exported Constants 61 * @brief DMA Exported constants 62 * @{ 63 */ 64 65 /** @defgroup DMAEx_Channel_selection DMA Channel selection 66 * @brief DMAEx channel selection 67 * @{ 68 */ 69 #define DMA_CHANNEL_0 0x00000000U /*!< DMA Channel 0 */ 70 #define DMA_CHANNEL_1 0x02000000U /*!< DMA Channel 1 */ 71 #define DMA_CHANNEL_2 0x04000000U /*!< DMA Channel 2 */ 72 #define DMA_CHANNEL_3 0x06000000U /*!< DMA Channel 3 */ 73 #define DMA_CHANNEL_4 0x08000000U /*!< DMA Channel 4 */ 74 #define DMA_CHANNEL_5 0x0A000000U /*!< DMA Channel 5 */ 75 #define DMA_CHANNEL_6 0x0C000000U /*!< DMA Channel 6 */ 76 #define DMA_CHANNEL_7 0x0E000000U /*!< DMA Channel 7 */ 77 #if defined (STM32F722xx) || defined (STM32F723xx) || defined (STM32F732xx) || defined (STM32F733xx) ||\ 78 defined (STM32F765xx) || defined (STM32F767xx) || defined (STM32F769xx) || defined (STM32F777xx) ||\ 79 defined (STM32F779xx) || defined (STM32F730xx) 80 #define DMA_CHANNEL_8 0x10000000U /*!< DMA Channel 8 */ 81 #define DMA_CHANNEL_9 0x12000000U /*!< DMA Channel 9 */ 82 #define DMA_CHANNEL_10 0x14000000U /*!< DMA Channel 10*/ 83 #define DMA_CHANNEL_11 0x16000000U /*!< DMA Channel 11*/ 84 #define DMA_CHANNEL_12 0x18000000U /*!< DMA Channel 12*/ 85 #define DMA_CHANNEL_13 0x1A000000U /*!< DMA Channel 13*/ 86 #define DMA_CHANNEL_14 0x1C000000U /*!< DMA Channel 14*/ 87 #define DMA_CHANNEL_15 0x1E000000U /*!< DMA Channel 15*/ 88 #endif /* STM32F722xx || STM32F723xx || STM32F732xx || STM32F733xx || STM32F765xx || STM32F767xx || 89 STM32F769xx || STM32F777xx || STM32F779xx || STM32F730xx */ 90 91 /** 92 * @} 93 */ 94 95 /** 96 * @} 97 */ 98 99 /* Exported functions --------------------------------------------------------*/ 100 /** @defgroup DMAEx_Exported_Functions DMAEx Exported Functions 101 * @brief DMAEx Exported functions 102 * @{ 103 */ 104 105 /** @defgroup DMAEx_Exported_Functions_Group1 Extended features functions 106 * @brief Extended features functions 107 * @{ 108 */ 109 110 /* IO operation functions *******************************************************/ 111 HAL_StatusTypeDef HAL_DMAEx_MultiBufferStart(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t SecondMemAddress, uint32_t DataLength); 112 HAL_StatusTypeDef HAL_DMAEx_MultiBufferStart_IT(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t SecondMemAddress, uint32_t DataLength); 113 HAL_StatusTypeDef HAL_DMAEx_ChangeMemory(DMA_HandleTypeDef *hdma, uint32_t Address, HAL_DMA_MemoryTypeDef memory); 114 115 /** 116 * @} 117 */ 118 /** 119 * @} 120 */ 121 122 /* Private macros ------------------------------------------------------------*/ 123 /** @defgroup DMAEx_Private_Macros DMA Private Macros 124 * @brief DMAEx private macros 125 * @{ 126 */ 127 #if defined (STM32F722xx) || defined (STM32F723xx) || defined (STM32F732xx) || defined (STM32F733xx) ||\ 128 defined (STM32F765xx) || defined (STM32F767xx) || defined (STM32F769xx) || defined (STM32F777xx) ||\ 129 defined (STM32F779xx) || defined (STM32F730xx) 130 #define IS_DMA_CHANNEL(CHANNEL) (((CHANNEL) == DMA_CHANNEL_0) || \ 131 ((CHANNEL) == DMA_CHANNEL_1) || \ 132 ((CHANNEL) == DMA_CHANNEL_2) || \ 133 ((CHANNEL) == DMA_CHANNEL_3) || \ 134 ((CHANNEL) == DMA_CHANNEL_4) || \ 135 ((CHANNEL) == DMA_CHANNEL_5) || \ 136 ((CHANNEL) == DMA_CHANNEL_6) || \ 137 ((CHANNEL) == DMA_CHANNEL_7) || \ 138 ((CHANNEL) == DMA_CHANNEL_8) || \ 139 ((CHANNEL) == DMA_CHANNEL_9) || \ 140 ((CHANNEL) == DMA_CHANNEL_10) || \ 141 ((CHANNEL) == DMA_CHANNEL_11) || \ 142 ((CHANNEL) == DMA_CHANNEL_12) || \ 143 ((CHANNEL) == DMA_CHANNEL_13) || \ 144 ((CHANNEL) == DMA_CHANNEL_14) || \ 145 ((CHANNEL) == DMA_CHANNEL_15)) 146 #else 147 #define IS_DMA_CHANNEL(CHANNEL) (((CHANNEL) == DMA_CHANNEL_0) || \ 148 ((CHANNEL) == DMA_CHANNEL_1) || \ 149 ((CHANNEL) == DMA_CHANNEL_2) || \ 150 ((CHANNEL) == DMA_CHANNEL_3) || \ 151 ((CHANNEL) == DMA_CHANNEL_4) || \ 152 ((CHANNEL) == DMA_CHANNEL_5) || \ 153 ((CHANNEL) == DMA_CHANNEL_6) || \ 154 ((CHANNEL) == DMA_CHANNEL_7)) 155 #endif /* STM32F722xx || STM32F723xx || STM32F732xx || STM32F733xx || STM32F765xx || STM32F767xx || 156 STM32F769xx || STM32F777xx || STM32F779xx || STM32F730xx*/ 157 /** 158 * @} 159 */ 160 161 /* Private functions ---------------------------------------------------------*/ 162 /** @defgroup DMAEx_Private_Functions DMAEx Private Functions 163 * @brief DMAEx Private functions 164 * @{ 165 */ 166 /** 167 * @} 168 */ 169 170 /** 171 * @} 172 */ 173 174 /** 175 * @} 176 */ 177 178 #ifdef __cplusplus 179 } 180 #endif 181 182 #endif /* __STM32F7xx_HAL_DMA_H */ 183 184