?? adc.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 + -