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

📄 adc.h

📁 基于st7的模数转换
💻 H
字号:
/*
*******************************************************************************
COPYRIGHT 2003 STMicroelectronics
Source File Name : adc.h
Group            : IPSW,CMG-IPDF.
Author           : MCD Application Team
Date First Issued: 6/3/2002
********************************Documentation**********************************
General Purpose - This file defines prototypes for all the functions whose 
				  source code appears in adc.c.
********************************RevisionHistory********************************
_______________________________________________________________________________
Date :06/03/2002 Release:1.0 
Date :22/09/2003 Release:2.0 
                 1.Replaced functions prototype of three function with Macro.
                 2.Included necessary comments.
                 3.Removed inclusion of adc_hr.h.
                 4.Modified the code to support new devices mentioned in adc.c.
   
******************************************************************************/
	
#ifndef ADC_H
#define ADC_H     

#include "ST7lib_config.h"     	          /*Selection of device and compiler */
           
     
/*---------------------------------------------------------------------------*/
typedef enum {
	      ADC_DEFAULT    = (unsigned char) 0x00,
	      ADC_SPEED      = (unsigned char) 0x40,
    	  ADC_SLOW       = (unsigned char) 0x08
     	  }Typ_ADC_InitParameter;
	    

/*---------------------------------------------------------------------------*/

#define ADC_Enable() (ADCCSR |= 0x20)          /* macro for Enabling the adc */

#define ADC_Disable() (ADCCSR &= 0xDF)        /* macro for disabling the adc */


/* FUNCTIONS Prototype */
/*---------------------------------------------------------------------------*/

unsigned int ADC_Conversn_Read (void);                 /* Read the conversion*/


/*---------------------------------------------------------------------------*/
void ADC_Init(Typ_ADC_InitParameter InitValue);             /* Initialize ADC*/
BOOL ADC_Test_Conversn_Complete (void);   /* Wait till conversion is complete*/
void ADC_Select_Channel (unsigned char ADC_AIN);/* Select the desired channel*/
/*---------------------------------------------------------------------------*/


#endif
/**********   (c) 2003  ST Microelectronics ***************END OF FILE *******/



⌨️ 快捷键说明

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