⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 adc.h

📁 周立功WinCE光盘资料
💻 H
字号:
/****************************************Copyright (c)**************************************************
**                               Guangzhou ZHIYUAN electronics Co.,LTD.
**                                     
**                                 http://www.zyinside.com
**
**--------------File Info-------------------------------------------------------------------------------
** File Name: 				adc.h
** Last modified Date: 		2006.10.09
** Last Version:			V1.0 		
** Description: 			adc.h, S3C2410A 自带 A/D 转换器驱动程序头文件 
**                          adc.h, the head file of A/D driver of the S3C2410A A/D converter  
**------------------------------------------------------------------------------------------------------
** Created By: 				MingYuan Zheng 郑明远
** Created date: 			2006.10.09
** Version: 				V1.0
** Descriptions:			The original version 初始版本
**
**------------------------------------------------------------------------------------------------------
** Modified by:
** Modified date:
** Version:
** Description: 
**
********************************************************************************************************/


#ifndef __ADC_H__
#define __ADC_H__

#ifdef __cplusplus
extern "C" {
#endif


#define  IOCTL_SET_ADC_CHANNEL		0x01

#define  IOCTL_SET_ADC_FREQUENCY    0x02

#define  IOCTL_GET_ADC_CURFREQ  	0x03

#define  IOCTL_SET_ADC_MAXFREQ		0x04

#define  IOCTL_SET_ADC_MINFREQ		0x05

// ADCCON 寄存器
#define  ADCCON_EN_START 	     (1 << 0)
#define  ADCCON_DIS_START   	 (0 << 0)

#define  ADCCON_DIS_READSTART    (0 << 1)
#define  ADCCON_EN_READSTART     (1 << 1)

#define  ADCCON_NORMAL_MODE      (0 << 2)
#define  ADCCON_STANDBY_MODE     (1 << 2)

#define  ADCCON_CHANNEL_MSK	 	 (0x07 << 3)
#define  ADCCON_CHANNEL_0		 0
#define  ADCCON_CHANNEL_1		 1
#define  ADCCON_CHANNEL_2		 2
#define  ADCCON_CHANNEL_3		 3
#define  ADCCON_CHANNEL_4		 4
#define  ADCCON_CHANNEL_5		 5
#define  ADCCON_CHANNEL_6		 6
#define  ADCCON_CHANNEL_7		 7

#define  ADCCON_PRSCVL_MSK       (0xFF << 6) 
  
#define  ADCCON_PRSCEN_EN	  	 (1 << 14)
#define  ADCCON_PRSCEN_DIS		 (0 << 14)

#define  ADCCIN_CONVERTING		 (0 << 15)
#define  ADCCIN_CONVERT_END		 (1 << 15)

// ADCTSC 寄存器
#define  ADCTSC_NORMAL_MODE	     (0x3 << 0)

#ifdef __cplusplus
}
#endif

#endif // __ADC_H__

⌨️ 快捷键说明

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