www.pudn.com > 2minilib.rar > AD.h


/***************************************************************************\ 
	Copyright (c) 2004-2007 threewater@up-tech.com, All rights reserved. 
	by threewter	2004.4.26 
\***************************************************************************/ 
	 
 
/***************************************************************************\ 
    #说明: s3c2410 AD函数头文件定义 
	----------------------------------  Bug  -------------------------------------- 
 
	----------------------------------  TODO list  ---------------------------------- 
 
	----------------------------------修正-------------------------------------- 
	2004-11-4	创建,测试通过 
 
	----------------------------------使用说明-------------------------------- 
 
\***************************************************************************/ 
#ifndef __AD_H__ 
#define __AD_H__ 
 
#include "../inc/drv/reg2410.h" 
 
#define ADCCR_ACCPD			0x80 
#define ADCCR_DIRECTC		0x40 
#define ADCCR_WAIT2CLK		(0x1<<2) 
#define ADCCR_WAIT4CLK		(0x2<<2) 
#define ADCCR_EDGE			(0x3<<2) 
#define ADCCR_SOP			0x2 
#define ADCCR_LONGCAL		1 
 
#define rADCCON		(*(volatile unsigned *)0x58000000) 
#define rADCDAT0	(*(volatile unsigned *)0x5800000C) 
#define PRSCVL (49<<6) 
#define ADCCON_ENABLE_START (0x1) 
#define STDBM (0x0<<2) 
#define PRSCEN (0x1<<14) 
 
#define ADCDIRCR_AIOSTOP	(1<<7) 
#define ADCDIRCR_ADIN(n)		(1<