rt-thread/bsp/synwit/swm320/libraries/SWM320_StdPeriph_Driver/SWM320_dma.h

21 lines
916 B
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef __SWM320_DMA_H__
#define __SWM320_DMA_H__
#define DMA_CH0 0
#define DMA_CH1 1
#define DMA_CH2 2
void DMA_CHM_Config(uint32_t chn, uint32_t src_addr, uint32_t src_addr_incr, uint32_t dst_addr, uint32_t dst_addr_incr, uint32_t num_word, uint32_t int_en); //DMA通道配置用于存储器间如Flash和RAM间搬运数据
void DMA_CH_Open(uint32_t chn); //DMA通道打开
void DMA_CH_Close(uint32_t chn); //DMA通道关闭
void DMA_CH_INTEn(uint32_t chn); //DMA中断使能数据搬运完成后触发中断
void DMA_CH_INTDis(uint32_t chn); //DMA中断禁止数据搬运完成后不触发中断
void DMA_CH_INTClr(uint32_t chn); //DMA中断标志清除
uint32_t DMA_CH_INTStat(uint32_t chn); //DMA中断状态查询1 数据搬运完成 0 数据搬运未完成
#endif //__SWM320_DMA_H__