You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

198 lines
7.7 KiB

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