dma.h

来自「BlackFin处理器视频演示代码」· C头文件 代码 · 共 99 行

H
99
字号
/**
 *@file dma.h
 *@author Zlatan Stanojevic
 *
 *This file contains DMA definitions used in @ref analog_video.c .
 */




#ifndef DMA_H
#define DMA_H


#undef DMAEN     
#undef WNR 
#undef WDSIZE_8  
#undef WDSIZE_16 
#undef WDSIZE_32 
#undef DMA2D     
#undef RESTART   
#undef DI_SEL    
#undef DI_EN     
#undef NDSIZE    
#undef FLOW      
#undef FLOW_STOP
               
               
#undef DMAEN_P   
#undef WNR_P     
#undef DMA2D_P   
#undef RESTART_P 
#undef DI_SEL_P  
#undef DI_EN_P   


enum
{
	FLOW_STOP 		= 0x0000,
	FLOW_AUTOBUFFER	= 0x1000,
	FLOW_DESC_ARRAY	= 0x4000,
	FLOW_DESC_LIST	= 0x7000,
	FLOW_DUMMY		= 0xffff
};

#define NDSIZE( size ) ( ( (unsigned short)size ) << 8 )

enum
{
	DI_EN		= 0x0080,
	DI_SEL		= 0x0040,
	RESTART 	= 0x0020,
	DMA2D		= 0x0010,
	WNR			= 0x0002,
	DMAEN		= 0x0001,
	FLAG_DUMMY	= 0xffff
};

enum
{
	WDSIZE_8		= 0x0000,
	WDSIZE_16		= 0x0004,
	WDSIZE_32		= 0x0008,
	WDSIZE_DUMMY	= 0xffff
};



#pragma pack( push )
#pragma pack( 2 )

typedef struct
{
	void *next_desc;
	void *start_addr;
	unsigned short dmacfg;
	unsigned short x_count;
	unsigned short x_modify;
	unsigned short y_count;
	unsigned short y_modify;
} DMAListDescriptor;


typedef struct
{
	void *start_addr;
	unsigned short dmacfg;
	unsigned short x_count;
	unsigned short x_modify;
	unsigned short y_count;
	unsigned short y_modify;
} DMAArrayDescriptor;


#pragma pack( pop )


#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?