65 lines
1.1 KiB
C
65 lines
1.1 KiB
C
#ifndef BMS_HV_ADC_MANAGER_H_
|
|
#define BMS_HV_ADC_MANAGER_H_
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#include "kit_macro.h"
|
|
|
|
#ifdef ADS_8688_EN
|
|
#include "drv_ads8688.h"
|
|
#endif
|
|
|
|
typedef enum
|
|
{
|
|
kHvType_Hv1,
|
|
kHvType_Bat,
|
|
kHvType_End,
|
|
}HvType;
|
|
|
|
typedef struct
|
|
{
|
|
int32_t zero;
|
|
uint32_t rate;
|
|
}AdjustValue;
|
|
|
|
typedef enum
|
|
{
|
|
kCurChannel_1,
|
|
kCurChannel_2,
|
|
kCurChannel_End,
|
|
}CurChannel;
|
|
|
|
typedef enum
|
|
{
|
|
kEnTemp_T1,
|
|
kEnTemp_T2,
|
|
kEnTemp_T3,
|
|
kEnTemp_T4,
|
|
kEnTemp_End,
|
|
}EnTemp;
|
|
|
|
|
|
void bms_init_cur_hv(void);
|
|
int16_t bms_poll_cur_hv(uint32_t base_time);
|
|
|
|
int16_t bms_get_current(void);
|
|
int16_t bms_get_show_current(void);
|
|
|
|
bool bms_is_high_volt_sim(void);
|
|
void bms_set_current(int32_t cur);
|
|
void bms_set_current_channel(CurChannel channel);
|
|
void bms_set_sim_high_volt(HvType type, uint16_t value);
|
|
int16_t bms_get_high_volt(HvType type);
|
|
uint16_t bms_get_en_temp(EnTemp idx);
|
|
void bms_set_en_temp(EnTemp idx, uint16_t temp);
|
|
void bms_set_high_volt(HvType type, uint16_t value);
|
|
int16_t bms_caculate_current(uint32_t base_time);
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|
|
|