A bundled STM32F10x Std Periph and CMSIS library
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.
 
 
 
 
 

441 lines
20 KiB

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