1 /******************************************************************************
2 ** File Name: adc_drvapi.h *
5 ** Copyright: 2002 Spreatrum, Incoporated. All Rights Reserved. *
6 ** Description: This file defines the basic input and output operations *
7 ** on hardware, it can be treated as a hardware abstract *
9 ******************************************************************************
11 ******************************************************************************
13 ** ------------------------------------------------------------------------- *
14 ** DATE NAME DESCRIPTION * ** 06/12/2010 hao.liu Create. *
15 ******************************************************************************/
17 #ifndef _ADC_DRVAPI_H_
18 #define _ADC_DRVAPI_H_
20 #define ADC_SCALE_3V 0
21 #define ADC_SCALE_1V2 1
59 typedef enum{false, true} bool;
61 #ifdef CONFIG_MACH_SP6810A
62 #define ADC_CHANNEL_TEMP 0
64 #define ADC_CHANNEL_TEMP 1
66 #define ADC_CHANNEL_VBAT 5
67 #define ADC_CHANNEL_PROG 4
68 #define ADC_CHANNEL_VCHG 6
76 int32_t ADC_GetValues(adc_channel id, bool scale, uint8_t num, int32_t *p_buf);
77 int32_t ADC_GetValue(adc_channel adcSource, bool scale);
83 #endif // _ADC_DRVAPI_H_