#ifndef __ST_DMA_H__ #define __ST_DMA_H__ #include ////////////////////////////////////////////////////////////////////////////////// //本程序只供学习使用,未经作者许可,不得用于其它任何用途 //ALIENTEK STM32H7开发板 //DMA 驱动代码 //正点原子@ALIENTEK //技术论坛:www.openedv.com //创建日期:2018/6/13 //版本:V1.0 //版权所有,盗版必究。 //Copyright(C) 广州市星翼电子科技有限公司 2014-2024 //All rights reserved ////////////////////////////////////////////////////////////////////////////////// #define ST_DMA1_STREAM1 0 #define ST_DMA1_STREAM2 1 #define ST_DMA1_STREAM3 2 #define ST_DMA1_STREAM4 3 #define ST_DMA1_STREAM5 4 #define ST_DMA1_STREAM6 5 #define ST_DMA1_STREAM7 6 #define ST_DMA2_STREAM1 7 #define ST_DMA2_STREAM2 8 #define ST_DMA2_STREAM3 9 #define ST_DMA2_STREAM4 10 #define ST_DMA2_STREAM5 11 typedef DMA_Channel_TypeDef DMA_Stream_TypeDef; void st_dma_init(void); void * st_dma_get_stream(uint8_t streamx); void * st_dma_get_dmax(uint8_t streamx); void st_dma_config(uint8_t streamx,uint8_t chx,uint32_t par,uint32_t mar,uint16_t ndtr);//配置DMAx_CHx void st_dma_enable(uint8_t streamx,uint16_t ndtr); //使能一次DMA传输 void st_dma_disable(uint8_t streamx); int st_dma_is_enable(uint8_t streamx); #endif