/***********************************************************************************************************
 * Copyright (c)  2021 - 2022, Unicmicro Co.,Ltd .
 * All rights reserved.
 * Filename    : dma.c
 * Description : dma driver header file
 * Author(s)   : yanhaihua
 * Version     : V1.0
 * Modify date : 2021-09-23
 ***********************************************************************************************************/
#ifndef __DMA_H__
#define __DMA_H__

#include  "config.h"

#ifdef UM2080F32_USING_DMA

typedef enum
{
	DMA_CH_0								= 0,
	DMA_CH_1								= 1,
	DMA_CH_2								= 2,
	DMA_CH_3								= 3,
}em_dma_ch_t;

void dma_init(em_dma_ch_t chn);

void dma_irq_init(em_dma_ch_t chn,em_enable_t irq_enable,void (*pfunc)());

void dma_irq_transfer(em_dma_ch_t chn, uint32_t src_addr, uint32_t dest_addr, uint16_t len);

void dma_poll_transfer(em_dma_ch_t chn, uint32_t src_addr, uint32_t dest_addr, uint16_t len);

#endif
#endif
