#ifndef BMS_ISO_H_
#define BMS_ISO_H_

#ifdef __cplusplus
extern "C" {
#endif 

#include "kit_macro.h"

typedef enum
{
    kIsoCtrl_Disable = 0,  //绝缘监测禁止
    kIsoCtrl_Enable,       //绝缘监测使能-轮检
	kIsoCtrl_Once,         //绝缘监测单次
    kIsoCtrl_SelfCheck,    //仅高压回路闭合前检测
	kIsoCtrl_End,          
}IsoCtrl;

typedef enum
{
    kIsoData_PosRes, //正极绝缘阻值
    kIsoData_NegRes, //负极绝缘阻值
    kIsoData_PosValue,
    kIsoData_NegValue,
	kIsoData_Res, // 系统绝缘阻值
    kIsoData_Value,
    kIsoData_End,
}IsoData;

typedef enum
{
    kIsoVolt_TotalVolt,
    kIsoVolt_Other,
    kIsoVolt_End,
}IsoVolt;

void bms_init_iso(void);
void bms_set_iso_ctrl(IsoCtrl ctrl);
void bms_set_iso_volt_ad(IsoVolt idx, int32_t ad);
void bms_poll_iso(uint32_t base_time);
uint16_t bms_get_iso_data(IsoData idx);
void bms_set_iso_bsu_ctrl(IsoCtrl ctrl);

#ifdef __cplusplus
}
#endif

#endif

