SY8835_For_Demo_Ourself/UsrInc/bat/bat.h

79 lines
1.9 KiB
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
******************************************************************************
*
* @file bat.h
* @brief bat module
* @ic sy8835
*
* @version 1.0
* @date 2024/11/01 09:59:40
* @author Alex Xu
*
* Copyright (c) 2013-2099,Tkplusemi Technology Co.,Ltd.
* All Rights Reserved
*
* History:
* Revision Date Author Desc
* 1.0.0 2024/11/01 Alex build this file
******************************************************************************
*/
#ifndef __BAT_H__
#define __BAT_H__
/*_____ I N C L U D E S ____________________________________________________*/
#include "define.h"
/******************************************************************************\
Macro definitions
\******************************************************************************/
#define C_bat_level_protect 0
#define C_bat_level_lowpower 1
#define C_bat_level_25p_power 5
#define C_bat_level_50p_power 10
#define C_bat_level_75p_power 15
/******************************************************************************\
Variables definitions
\******************************************************************************/
extern uint8_t bat_level;
extern uint8_t offset_bat_level;
extern bit F_batlevel_low; //电池低压
extern bit F_batlevel_protect; //低电保护
extern bit F_batlevel_25p;
extern bit F_batlevel_50p;
extern bit F_batlevel_75p;
#if GAUGE_ENABLE
extern uint8 SOC_report; //上报的SOC值结合库仑计信息和SOC_int/SOC_dsg之间
extern void Bat_Cal_Init(void);
extern void Bat_Gauge_Handle(void);
#endif
#if BAT_VALUE
/******************************************************************************\
Functions definitions
\******************************************************************************/
extern void check_bat_level(void);
#endif
#endif