| 1234567891011121314151617181920212223242526272829303132 |
- #ifndef _HEALTH_H__
- #define _HEALTH_H__
- #include <stdint.h>
- /*
- * xxx_over_temp: 表示过高温(温度过高)
- * xxx_under_temp: 表示过低温(温度过低)
- */
- typedef struct {
- uint32_t charger_over_current:1;
- uint32_t charger_over_temp:1;
- uint32_t charger_lower_temp:1;
- uint32_t discharger_over_temp:1;
- uint32_t discharger_lower_temp:1;
- uint32_t discharger_lower_voltage:1;
- uint32_t powerdown_lower_voltage:1;
- uint32_t sigle_cell_lower_voltage:1;
- uint32_t sigle_cell_over_voltage:1;
- uint32_t load_current_short:1; //大电短路保护
- uint32_t small_current_short:1;
- uint16_t internal_resistance; //pack's internal resistance
- }bms_health_t;
- bms_health_t *bms_health(void);
- void health_init(void);
- void check_current_state(void);
- void check_voltage_state(void);
- void check_temp_state(void);
- void health_process_aux_lock(void);
- #endif /* _HEALTH_H__ */
|