38 lines
643 B
C
38 lines
643 B
C
#ifndef __ADC_H
|
|
#define __ADC_H
|
|
#include "general_type.h"
|
|
#include "pbdata.h"
|
|
//#include "stdint.h"
|
|
//#define ADC_CH1 1 //通道1
|
|
//#define ADC_CH_TEMP 16 //温度传感器通道
|
|
|
|
void Adc_Get_Voltage(void);
|
|
u16 Get_Adc(u8 ch); //获得某个通道值
|
|
float Get_Adc_Average(u8 ch,u8 times);//得到某个通道10次采样的平均值
|
|
u16 Get_Adc2(u8 ch) ;
|
|
extern float ADC_VALUVE;
|
|
extern __IO uint16_t VREFINT_CAL;
|
|
extern __IO uint16_t VREFINT_DATA;
|
|
extern __IO float VDDA_VAL;
|
|
void ADC15_Init(void);
|
|
float Get_Adc_Ref(u8 ch);
|
|
void ADC15_POWERON(void);
|
|
void ADC15_POWEROFF(void);
|
|
void ADC15_Process(void);
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|