#ifndef __DMA_H__
#define __DMA_H__

#include <cstdint>

struct dma_channel_control
{
	uint32_t src_end;

	uint32_t dst_end;

	struct
	{
		unsigned long cycle_ctrl :3;
		unsigned long :1;
		unsigned long n_minus_1 :10;
		unsigned long r_power :4;
		unsigned long :6;
		unsigned long src_size :2;
		unsigned long src_inc :2;
		unsigned long :2;
		unsigned long dst_inc :2;
	} control_data;

	uint32_t :32;
};

extern void initial_dma(void);

extern int enable_dma_spi1tx(int argc, char *argv[]);

#endif
