No Description
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.

stm32f10x_dma.h 20KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445
  1. /**
  2. ******************************************************************************
  3. * @file stm32f10x_dma.h
  4. * @author MCD Application Team
  5. * @version V3.6.1
  6. * @date 05-March-2012
  7. * @brief This file contains all the functions prototypes for the DMA firmware
  8. * library.
  9. ******************************************************************************
  10. * @attention
  11. *
  12. * <h2><center>&copy; COPYRIGHT 2012 STMicroelectronics</center></h2>
  13. *
  14. * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
  15. * You may not use this file except in compliance with the License.
  16. * You may obtain a copy of the License at:
  17. *
  18. * http://www.st.com/software_license_agreement_liberty_v2
  19. *
  20. * Unless required by applicable law or agreed to in writing, software
  21. * distributed under the License is distributed on an "AS IS" BASIS,
  22. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  23. * See the License for the specific language governing permissions and
  24. * limitations under the License.
  25. *
  26. ******************************************************************************
  27. */
  28. /* Define to prevent recursive inclusion -------------------------------------*/
  29. #ifndef __STM32F10x_DMA_H
  30. #define __STM32F10x_DMA_H
  31. #ifdef __cplusplus
  32. extern "C" {
  33. #endif
  34. /* Includes ------------------------------------------------------------------*/
  35. #include "stm32f10x.h"
  36. /** @addtogroup STM32F10x_StdPeriph_Driver
  37. * @{
  38. */
  39. /** @addtogroup DMA
  40. * @{
  41. */
  42. /** @defgroup DMA_Exported_Types
  43. * @{
  44. */
  45. /**
  46. * @brief DMA Init structure definition
  47. */
  48. typedef struct
  49. {
  50. uint32_t DMA_PeripheralBaseAddr; /*!< Specifies the peripheral base address for DMAy Channelx. */
  51. uint32_t DMA_MemoryBaseAddr; /*!< Specifies the memory base address for DMAy Channelx. */
  52. uint32_t DMA_DIR; /*!< Specifies if the peripheral is the source or destination.
  53. This parameter can be a value of @ref DMA_data_transfer_direction */
  54. uint32_t DMA_BufferSize; /*!< Specifies the buffer size, in data unit, of the specified Channel.
  55. The data unit is equal to the configuration set in DMA_PeripheralDataSize
  56. or DMA_MemoryDataSize members depending in the transfer direction. */
  57. uint32_t DMA_PeripheralInc; /*!< Specifies whether the Peripheral address register is incremented or not.
  58. This parameter can be a value of @ref DMA_peripheral_incremented_mode */
  59. uint32_t DMA_MemoryInc; /*!< Specifies whether the memory address register is incremented or not.
  60. This parameter can be a value of @ref DMA_memory_incremented_mode */
  61. uint32_t DMA_PeripheralDataSize; /*!< Specifies the Peripheral data width.
  62. This parameter can be a value of @ref DMA_peripheral_data_size */
  63. uint32_t DMA_MemoryDataSize; /*!< Specifies the Memory data width.
  64. This parameter can be a value of @ref DMA_memory_data_size */
  65. uint32_t DMA_Mode; /*!< Specifies the operation mode of the DMAy Channelx.
  66. This parameter can be a value of @ref DMA_circular_normal_mode.
  67. @note: The circular buffer mode cannot be used if the memory-to-memory
  68. data transfer is configured on the selected Channel */
  69. uint32_t DMA_Priority; /*!< Specifies the software priority for the DMAy Channelx.
  70. This parameter can be a value of @ref DMA_priority_level */
  71. uint32_t DMA_M2M; /*!< Specifies if the DMAy Channelx will be used in memory-to-memory transfer.
  72. This parameter can be a value of @ref DMA_memory_to_memory */
  73. }DMA_InitTypeDef;
  74. /**
  75. * @}
  76. */
  77. /** @defgroup DMA_Exported_Constants
  78. * @{
  79. */
  80. #define IS_DMA_ALL_PERIPH(PERIPH) (((PERIPH) == DMA1_Channel1) || \
  81. ((PERIPH) == DMA1_Channel2) || \
  82. ((PERIPH) == DMA1_Channel3) || \
  83. ((PERIPH) == DMA1_Channel4) || \
  84. ((PERIPH) == DMA1_Channel5) || \
  85. ((PERIPH) == DMA1_Channel6) || \
  86. ((PERIPH) == DMA1_Channel7) || \
  87. ((PERIPH) == DMA2_Channel1) || \
  88. ((PERIPH) == DMA2_Channel2) || \
  89. ((PERIPH) == DMA2_Channel3) || \
  90. ((PERIPH) == DMA2_Channel4) || \
  91. ((PERIPH) == DMA2_Channel5))
  92. /** @defgroup DMA_data_transfer_direction
  93. * @{
  94. */
  95. #define DMA_DIR_PeripheralDST ((uint32_t)0x00000010)
  96. #define DMA_DIR_PeripheralSRC ((uint32_t)0x00000000)
  97. #define IS_DMA_DIR(DIR) (((DIR) == DMA_DIR_PeripheralDST) || \
  98. ((DIR) == DMA_DIR_PeripheralSRC))
  99. /**
  100. * @}
  101. */
  102. /** @defgroup DMA_peripheral_incremented_mode
  103. * @{
  104. */
  105. #define DMA_PeripheralInc_Enable ((uint32_t)0x00000040)
  106. #define DMA_PeripheralInc_Disable ((uint32_t)0x00000000)
  107. #define IS_DMA_PERIPHERAL_INC_STATE(STATE) (((STATE) == DMA_PeripheralInc_Enable) || \
  108. ((STATE) == DMA_PeripheralInc_Disable))
  109. /**
  110. * @}
  111. */
  112. /** @defgroup DMA_memory_incremented_mode
  113. * @{
  114. */
  115. #define DMA_MemoryInc_Enable ((uint32_t)0x00000080)
  116. #define DMA_MemoryInc_Disable ((uint32_t)0x00000000)
  117. #define IS_DMA_MEMORY_INC_STATE(STATE) (((STATE) == DMA_MemoryInc_Enable) || \
  118. ((STATE) == DMA_MemoryInc_Disable))
  119. /**
  120. * @}
  121. */
  122. /** @defgroup DMA_peripheral_data_size
  123. * @{
  124. */
  125. #define DMA_PeripheralDataSize_Byte ((uint32_t)0x00000000)
  126. #define DMA_PeripheralDataSize_HalfWord ((uint32_t)0x00000100)
  127. #define DMA_PeripheralDataSize_Word ((uint32_t)0x00000200)
  128. #define IS_DMA_PERIPHERAL_DATA_SIZE(SIZE) (((SIZE) == DMA_PeripheralDataSize_Byte) || \
  129. ((SIZE) == DMA_PeripheralDataSize_HalfWord) || \
  130. ((SIZE) == DMA_PeripheralDataSize_Word))
  131. /**
  132. * @}
  133. */
  134. /** @defgroup DMA_memory_data_size
  135. * @{
  136. */
  137. #define DMA_MemoryDataSize_Byte ((uint32_t)0x00000000)
  138. #define DMA_MemoryDataSize_HalfWord ((uint32_t)0x00000400)
  139. #define DMA_MemoryDataSize_Word ((uint32_t)0x00000800)
  140. #define IS_DMA_MEMORY_DATA_SIZE(SIZE) (((SIZE) == DMA_MemoryDataSize_Byte) || \
  141. ((SIZE) == DMA_MemoryDataSize_HalfWord) || \
  142. ((SIZE) == DMA_MemoryDataSize_Word))
  143. /**
  144. * @}
  145. */
  146. /** @defgroup DMA_circular_normal_mode
  147. * @{
  148. */
  149. #define DMA_Mode_Circular ((uint32_t)0x00000020)
  150. #define DMA_Mode_Normal ((uint32_t)0x00000000)
  151. #define IS_DMA_MODE(MODE) (((MODE) == DMA_Mode_Circular) || ((MODE) == DMA_Mode_Normal))
  152. /**
  153. * @}
  154. */
  155. /** @defgroup DMA_priority_level
  156. * @{
  157. */
  158. #define DMA_Priority_VeryHigh ((uint32_t)0x00003000)
  159. #define DMA_Priority_High ((uint32_t)0x00002000)
  160. #define DMA_Priority_Medium ((uint32_t)0x00001000)
  161. #define DMA_Priority_Low ((uint32_t)0x00000000)
  162. #define IS_DMA_PRIORITY(PRIORITY) (((PRIORITY) == DMA_Priority_VeryHigh) || \
  163. ((PRIORITY) == DMA_Priority_High) || \
  164. ((PRIORITY) == DMA_Priority_Medium) || \
  165. ((PRIORITY) == DMA_Priority_Low))
  166. /**
  167. * @}
  168. */
  169. /** @defgroup DMA_memory_to_memory
  170. * @{
  171. */
  172. #define DMA_M2M_Enable ((uint32_t)0x00004000)
  173. #define DMA_M2M_Disable ((uint32_t)0x00000000)
  174. #define IS_DMA_M2M_STATE(STATE) (((STATE) == DMA_M2M_Enable) || ((STATE) == DMA_M2M_Disable))
  175. /**
  176. * @}
  177. */
  178. /** @defgroup DMA_interrupts_definition
  179. * @{
  180. */
  181. #define DMA_IT_TC ((uint32_t)0x00000002)
  182. #define DMA_IT_HT ((uint32_t)0x00000004)
  183. #define DMA_IT_TE ((uint32_t)0x00000008)
  184. #define IS_DMA_CONFIG_IT(IT) ((((IT) & 0xFFFFFFF1) == 0x00) && ((IT) != 0x00))
  185. #define DMA1_IT_GL1 ((uint32_t)0x00000001)
  186. #define DMA1_IT_TC1 ((uint32_t)0x00000002)
  187. #define DMA1_IT_HT1 ((uint32_t)0x00000004)
  188. #define DMA1_IT_TE1 ((uint32_t)0x00000008)
  189. #define DMA1_IT_GL2 ((uint32_t)0x00000010)
  190. #define DMA1_IT_TC2 ((uint32_t)0x00000020)
  191. #define DMA1_IT_HT2 ((uint32_t)0x00000040)
  192. #define DMA1_IT_TE2 ((uint32_t)0x00000080)
  193. #define DMA1_IT_GL3 ((uint32_t)0x00000100)
  194. #define DMA1_IT_TC3 ((uint32_t)0x00000200)
  195. #define DMA1_IT_HT3 ((uint32_t)0x00000400)
  196. #define DMA1_IT_TE3 ((uint32_t)0x00000800)
  197. #define DMA1_IT_GL4 ((uint32_t)0x00001000)
  198. #define DMA1_IT_TC4 ((uint32_t)0x00002000)
  199. #define DMA1_IT_HT4 ((uint32_t)0x00004000)
  200. #define DMA1_IT_TE4 ((uint32_t)0x00008000)
  201. #define DMA1_IT_GL5 ((uint32_t)0x00010000)
  202. #define DMA1_IT_TC5 ((uint32_t)0x00020000)
  203. #define DMA1_IT_HT5 ((uint32_t)0x00040000)
  204. #define DMA1_IT_TE5 ((uint32_t)0x00080000)
  205. #define DMA1_IT_GL6 ((uint32_t)0x00100000)
  206. #define DMA1_IT_TC6 ((uint32_t)0x00200000)
  207. #define DMA1_IT_HT6 ((uint32_t)0x00400000)
  208. #define DMA1_IT_TE6 ((uint32_t)0x00800000)
  209. #define DMA1_IT_GL7 ((uint32_t)0x01000000)
  210. #define DMA1_IT_TC7 ((uint32_t)0x02000000)
  211. #define DMA1_IT_HT7 ((uint32_t)0x04000000)
  212. #define DMA1_IT_TE7 ((uint32_t)0x08000000)
  213. #define DMA2_IT_GL1 ((uint32_t)0x10000001)
  214. #define DMA2_IT_TC1 ((uint32_t)0x10000002)
  215. #define DMA2_IT_HT1 ((uint32_t)0x10000004)
  216. #define DMA2_IT_TE1 ((uint32_t)0x10000008)
  217. #define DMA2_IT_GL2 ((uint32_t)0x10000010)
  218. #define DMA2_IT_TC2 ((uint32_t)0x10000020)
  219. #define DMA2_IT_HT2 ((uint32_t)0x10000040)
  220. #define DMA2_IT_TE2 ((uint32_t)0x10000080)
  221. #define DMA2_IT_GL3 ((uint32_t)0x10000100)
  222. #define DMA2_IT_TC3 ((uint32_t)0x10000200)
  223. #define DMA2_IT_HT3 ((uint32_t)0x10000400)
  224. #define DMA2_IT_TE3 ((uint32_t)0x10000800)
  225. #define DMA2_IT_GL4 ((uint32_t)0x10001000)
  226. #define DMA2_IT_TC4 ((uint32_t)0x10002000)
  227. #define DMA2_IT_HT4 ((uint32_t)0x10004000)
  228. #define DMA2_IT_TE4 ((uint32_t)0x10008000)
  229. #define DMA2_IT_GL5 ((uint32_t)0x10010000)
  230. #define DMA2_IT_TC5 ((uint32_t)0x10020000)
  231. #define DMA2_IT_HT5 ((uint32_t)0x10040000)
  232. #define DMA2_IT_TE5 ((uint32_t)0x10080000)
  233. #define IS_DMA_CLEAR_IT(IT) (((((IT) & 0xF0000000) == 0x00) || (((IT) & 0xEFF00000) == 0x00)) && ((IT) != 0x00))
  234. #define IS_DMA_GET_IT(IT) (((IT) == DMA1_IT_GL1) || ((IT) == DMA1_IT_TC1) || \
  235. ((IT) == DMA1_IT_HT1) || ((IT) == DMA1_IT_TE1) || \
  236. ((IT) == DMA1_IT_GL2) || ((IT) == DMA1_IT_TC2) || \
  237. ((IT) == DMA1_IT_HT2) || ((IT) == DMA1_IT_TE2) || \
  238. ((IT) == DMA1_IT_GL3) || ((IT) == DMA1_IT_TC3) || \
  239. ((IT) == DMA1_IT_HT3) || ((IT) == DMA1_IT_TE3) || \
  240. ((IT) == DMA1_IT_GL4) || ((IT) == DMA1_IT_TC4) || \
  241. ((IT) == DMA1_IT_HT4) || ((IT) == DMA1_IT_TE4) || \
  242. ((IT) == DMA1_IT_GL5) || ((IT) == DMA1_IT_TC5) || \
  243. ((IT) == DMA1_IT_HT5) || ((IT) == DMA1_IT_TE5) || \
  244. ((IT) == DMA1_IT_GL6) || ((IT) == DMA1_IT_TC6) || \
  245. ((IT) == DMA1_IT_HT6) || ((IT) == DMA1_IT_TE6) || \
  246. ((IT) == DMA1_IT_GL7) || ((IT) == DMA1_IT_TC7) || \
  247. ((IT) == DMA1_IT_HT7) || ((IT) == DMA1_IT_TE7) || \
  248. ((IT) == DMA2_IT_GL1) || ((IT) == DMA2_IT_TC1) || \
  249. ((IT) == DMA2_IT_HT1) || ((IT) == DMA2_IT_TE1) || \
  250. ((IT) == DMA2_IT_GL2) || ((IT) == DMA2_IT_TC2) || \
  251. ((IT) == DMA2_IT_HT2) || ((IT) == DMA2_IT_TE2) || \
  252. ((IT) == DMA2_IT_GL3) || ((IT) == DMA2_IT_TC3) || \
  253. ((IT) == DMA2_IT_HT3) || ((IT) == DMA2_IT_TE3) || \
  254. ((IT) == DMA2_IT_GL4) || ((IT) == DMA2_IT_TC4) || \
  255. ((IT) == DMA2_IT_HT4) || ((IT) == DMA2_IT_TE4) || \
  256. ((IT) == DMA2_IT_GL5) || ((IT) == DMA2_IT_TC5) || \
  257. ((IT) == DMA2_IT_HT5) || ((IT) == DMA2_IT_TE5))
  258. /**
  259. * @}
  260. */
  261. /** @defgroup DMA_flags_definition
  262. * @{
  263. */
  264. #define DMA1_FLAG_GL1 ((uint32_t)0x00000001)
  265. #define DMA1_FLAG_TC1 ((uint32_t)0x00000002)
  266. #define DMA1_FLAG_HT1 ((uint32_t)0x00000004)
  267. #define DMA1_FLAG_TE1 ((uint32_t)0x00000008)
  268. #define DMA1_FLAG_GL2 ((uint32_t)0x00000010)
  269. #define DMA1_FLAG_TC2 ((uint32_t)0x00000020)
  270. #define DMA1_FLAG_HT2 ((uint32_t)0x00000040)
  271. #define DMA1_FLAG_TE2 ((uint32_t)0x00000080)
  272. #define DMA1_FLAG_GL3 ((uint32_t)0x00000100)
  273. #define DMA1_FLAG_TC3 ((uint32_t)0x00000200)
  274. #define DMA1_FLAG_HT3 ((uint32_t)0x00000400)
  275. #define DMA1_FLAG_TE3 ((uint32_t)0x00000800)
  276. #define DMA1_FLAG_GL4 ((uint32_t)0x00001000)
  277. #define DMA1_FLAG_TC4 ((uint32_t)0x00002000)
  278. #define DMA1_FLAG_HT4 ((uint32_t)0x00004000)
  279. #define DMA1_FLAG_TE4 ((uint32_t)0x00008000)
  280. #define DMA1_FLAG_GL5 ((uint32_t)0x00010000)
  281. #define DMA1_FLAG_TC5 ((uint32_t)0x00020000)
  282. #define DMA1_FLAG_HT5 ((uint32_t)0x00040000)
  283. #define DMA1_FLAG_TE5 ((uint32_t)0x00080000)
  284. #define DMA1_FLAG_GL6 ((uint32_t)0x00100000)
  285. #define DMA1_FLAG_TC6 ((uint32_t)0x00200000)
  286. #define DMA1_FLAG_HT6 ((uint32_t)0x00400000)
  287. #define DMA1_FLAG_TE6 ((uint32_t)0x00800000)
  288. #define DMA1_FLAG_GL7 ((uint32_t)0x01000000)
  289. #define DMA1_FLAG_TC7 ((uint32_t)0x02000000)
  290. #define DMA1_FLAG_HT7 ((uint32_t)0x04000000)
  291. #define DMA1_FLAG_TE7 ((uint32_t)0x08000000)
  292. #define DMA2_FLAG_GL1 ((uint32_t)0x10000001)
  293. #define DMA2_FLAG_TC1 ((uint32_t)0x10000002)
  294. #define DMA2_FLAG_HT1 ((uint32_t)0x10000004)
  295. #define DMA2_FLAG_TE1 ((uint32_t)0x10000008)
  296. #define DMA2_FLAG_GL2 ((uint32_t)0x10000010)
  297. #define DMA2_FLAG_TC2 ((uint32_t)0x10000020)
  298. #define DMA2_FLAG_HT2 ((uint32_t)0x10000040)
  299. #define DMA2_FLAG_TE2 ((uint32_t)0x10000080)
  300. #define DMA2_FLAG_GL3 ((uint32_t)0x10000100)
  301. #define DMA2_FLAG_TC3 ((uint32_t)0x10000200)
  302. #define DMA2_FLAG_HT3 ((uint32_t)0x10000400)
  303. #define DMA2_FLAG_TE3 ((uint32_t)0x10000800)
  304. #define DMA2_FLAG_GL4 ((uint32_t)0x10001000)
  305. #define DMA2_FLAG_TC4 ((uint32_t)0x10002000)
  306. #define DMA2_FLAG_HT4 ((uint32_t)0x10004000)
  307. #define DMA2_FLAG_TE4 ((uint32_t)0x10008000)
  308. #define DMA2_FLAG_GL5 ((uint32_t)0x10010000)
  309. #define DMA2_FLAG_TC5 ((uint32_t)0x10020000)
  310. #define DMA2_FLAG_HT5 ((uint32_t)0x10040000)
  311. #define DMA2_FLAG_TE5 ((uint32_t)0x10080000)
  312. #define IS_DMA_CLEAR_FLAG(FLAG) (((((FLAG) & 0xF0000000) == 0x00) || (((FLAG) & 0xEFF00000) == 0x00)) && ((FLAG) != 0x00))
  313. #define IS_DMA_GET_FLAG(FLAG) (((FLAG) == DMA1_FLAG_GL1) || ((FLAG) == DMA1_FLAG_TC1) || \
  314. ((FLAG) == DMA1_FLAG_HT1) || ((FLAG) == DMA1_FLAG_TE1) || \
  315. ((FLAG) == DMA1_FLAG_GL2) || ((FLAG) == DMA1_FLAG_TC2) || \
  316. ((FLAG) == DMA1_FLAG_HT2) || ((FLAG) == DMA1_FLAG_TE2) || \
  317. ((FLAG) == DMA1_FLAG_GL3) || ((FLAG) == DMA1_FLAG_TC3) || \
  318. ((FLAG) == DMA1_FLAG_HT3) || ((FLAG) == DMA1_FLAG_TE3) || \
  319. ((FLAG) == DMA1_FLAG_GL4) || ((FLAG) == DMA1_FLAG_TC4) || \
  320. ((FLAG) == DMA1_FLAG_HT4) || ((FLAG) == DMA1_FLAG_TE4) || \
  321. ((FLAG) == DMA1_FLAG_GL5) || ((FLAG) == DMA1_FLAG_TC5) || \
  322. ((FLAG) == DMA1_FLAG_HT5) || ((FLAG) == DMA1_FLAG_TE5) || \
  323. ((FLAG) == DMA1_FLAG_GL6) || ((FLAG) == DMA1_FLAG_TC6) || \
  324. ((FLAG) == DMA1_FLAG_HT6) || ((FLAG) == DMA1_FLAG_TE6) || \
  325. ((FLAG) == DMA1_FLAG_GL7) || ((FLAG) == DMA1_FLAG_TC7) || \
  326. ((FLAG) == DMA1_FLAG_HT7) || ((FLAG) == DMA1_FLAG_TE7) || \
  327. ((FLAG) == DMA2_FLAG_GL1) || ((FLAG) == DMA2_FLAG_TC1) || \
  328. ((FLAG) == DMA2_FLAG_HT1) || ((FLAG) == DMA2_FLAG_TE1) || \
  329. ((FLAG) == DMA2_FLAG_GL2) || ((FLAG) == DMA2_FLAG_TC2) || \
  330. ((FLAG) == DMA2_FLAG_HT2) || ((FLAG) == DMA2_FLAG_TE2) || \
  331. ((FLAG) == DMA2_FLAG_GL3) || ((FLAG) == DMA2_FLAG_TC3) || \
  332. ((FLAG) == DMA2_FLAG_HT3) || ((FLAG) == DMA2_FLAG_TE3) || \
  333. ((FLAG) == DMA2_FLAG_GL4) || ((FLAG) == DMA2_FLAG_TC4) || \
  334. ((FLAG) == DMA2_FLAG_HT4) || ((FLAG) == DMA2_FLAG_TE4) || \
  335. ((FLAG) == DMA2_FLAG_GL5) || ((FLAG) == DMA2_FLAG_TC5) || \
  336. ((FLAG) == DMA2_FLAG_HT5) || ((FLAG) == DMA2_FLAG_TE5))
  337. /**
  338. * @}
  339. */
  340. /** @defgroup DMA_Buffer_Size
  341. * @{
  342. */
  343. #define IS_DMA_BUFFER_SIZE(SIZE) (((SIZE) >= 0x1) && ((SIZE) < 0x10000))
  344. /**
  345. * @}
  346. */
  347. /**
  348. * @}
  349. */
  350. /** @defgroup DMA_Exported_Macros
  351. * @{
  352. */
  353. /**
  354. * @}
  355. */
  356. /** @defgroup DMA_Exported_Functions
  357. * @{
  358. */
  359. void DMA_DeInit(DMA_Channel_TypeDef* DMAy_Channelx);
  360. void DMA_Init(DMA_Channel_TypeDef* DMAy_Channelx, DMA_InitTypeDef* DMA_InitStruct);
  361. void DMA_StructInit(DMA_InitTypeDef* DMA_InitStruct);
  362. void DMA_Cmd(DMA_Channel_TypeDef* DMAy_Channelx, FunctionalState NewState);
  363. void DMA_ITConfig(DMA_Channel_TypeDef* DMAy_Channelx, uint32_t DMA_IT, FunctionalState NewState);
  364. void DMA_SetCurrDataCounter(DMA_Channel_TypeDef* DMAy_Channelx, uint16_t DataNumber);
  365. uint16_t DMA_GetCurrDataCounter(DMA_Channel_TypeDef* DMAy_Channelx);
  366. FlagStatus DMA_GetFlagStatus(uint32_t DMAy_FLAG);
  367. void DMA_ClearFlag(uint32_t DMAy_FLAG);
  368. ITStatus DMA_GetITStatus(uint32_t DMAy_IT);
  369. void DMA_ClearITPendingBit(uint32_t DMAy_IT);
  370. #ifdef __cplusplus
  371. }
  372. #endif
  373. #endif /*__STM32F10x_DMA_H */
  374. /**
  375. * @}
  376. */
  377. /**
  378. * @}
  379. */
  380. /**
  381. * @}
  382. */
  383. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/