forked from SZV10X_Software/SZV103_FM33A0xxEV_SiZhu

周巍
2024-04-11 91ef77c00ed797b1048c5187f416e351e646a009
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
 
/******************************************************************************
 * 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