29 lines
591 B
C
29 lines
591 B
C
#ifndef __ADC_H
|
|
#define __ADC_H
|
|
|
|
|
|
#include "stm32f10x.h"
|
|
void ADC1_Init(void);
|
|
typedef struct
|
|
{
|
|
int16_t TemperatureValue;
|
|
float R_Value;
|
|
}TempRes_TypeDef;
|
|
|
|
int16_t FindTemperature(float r_value);
|
|
//ADC1采样数据结构
|
|
typedef struct
|
|
{
|
|
float BAT_Voltage; //A枪电池电压
|
|
float BAT_B_Reverse_Voltage; //B枪电池正负极反接电压
|
|
|
|
float Tempreture[3];
|
|
float VIN_Input_Voltage; //B枪电池正负极反接电压
|
|
}Sample_Data_t;
|
|
extern void BMS_Temperatrue_Sampling(void);
|
|
extern void VIN_Input_Sampling(void);
|
|
extern Sample_Data_t Sample_DataS;
|
|
void Gun_Input_Sampling(void);
|
|
#endif /* __ADC_H */
|
|
|