/****************************************************************************** * Copyright (C) 2014-2015 HangZhou SiZhu Co.,LTD. * *----------------------------------------------------------------------------- * File: adc.h * Description: head file of adc.c ,use arm inner adc1 to sample given voltage * Author: Lishoujian (867693272@qq.com) * Date: Jan 9, 2015 *****************************************************************************/ /* ----------------------- Platform includes --------------------------------*/ #ifndef __ADC_H #define __ADC_H #include "sys.h" #define AD_LENGTH 500 #define ADC_dianchi_PIN_NUM GPIO_Pin_3 #define ADC_dianchi_PIN_GROUP GPIOC typedef struct ad_data_get { u16 *ad_get_address_p; u32 ad_buffer_cnt; u8 ad_ch; }ad_data_s; double Temp_GetBFiltedData(ad_data_s * data_p); void Adc_set(u8 tem_flag); uint16 Get_vol_Average(u8 channel,u8 tem_flag); extern volatile u16 ad_data[1000]; u16 Get_val(u8 ch); #endif