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

18 lines
1.1 KiB
C
Raw Normal View History

2021-02-18 13:29:12 +08:00
#ifndef __SWM320_DMA_H__
#define __SWM320_DMA_H__
2021-05-06 10:42:41 +08:00
#define DMA_CH0 0
#define DMA_CH1 1
#define DMA_CH2 2
2021-02-18 13:29:12 +08:00
2021-05-06 10:42:41 +08:00
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通道关闭
2021-02-18 13:29:12 +08:00
2021-05-06 10:42:41 +08:00
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 数据搬运未完成
2021-02-18 13:29:12 +08:00
#endif //__SWM320_DMA_H__