BenTengFDC2/DCBMSBENTENGB30X02FullVersionVoltVechile/SYSTEM/adc.h

29 lines
591 B
C
Raw Normal View History

2024-04-11 09:17:36 +00:00
#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<43><31><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݽṹ
typedef struct
{
float BAT_Voltage; //Aǹ<41><C7B9><EFBFBD>ص<EFBFBD>ѹ
float BAT_B_Reverse_Voltage; //Bǹ<42><C7B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӵ<EFBFBD>ѹ
float Tempreture[3];
float VIN_Input_Voltage; //Bǹ<42><C7B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ӵ<EFBFBD>ѹ
}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 */