📄 hwapi_battery.h
字号:
/*********************************************************************************
* Copyright (C),2004-2005, Fuzhou Rockchip Co.,Ltd.
* All Rights Reserved
* V1.00
* FileName : hwapi_battery.h
* Author : lzy
* Description:
* History :
* <author> <time> <version> <desc>
* lzy 07/9/17 1.0 ORG
*********************************************************************************/
#ifndef _HW_BATTERY_H
#define _HW_BATTERY_H
#ifdef __cplusplus
extern "C"
{
#endif /* __cplusplus */
//1 参考电压的修正值,要除100
#define BATT_1V2_MODIFY 100
//1 1.25v参考电压
#define BATT_1V2_VALUE 1250*BATT_1V2_MODIFY/100
#define BATT_FULL_VALUE 4100 //1 4.19v充电满电压(硬件不支持充电满中断时用)
#define BATT_LEVEL2 3840
#define BATT_LEVEL1 3700
#define BATT_LEVEL0 3600
#define BATT_EMPTY_VALUE 3440 //1 3.3V低电报警电压,实测电压3.3/2
#define BATT_POWEROFF_VALUE BATT_EMPTY_VALUE
#define BATT_POWEROFF_CNT 8
#define BATT_TOTAL_STEPS 4
typedef enum
{
CHARGE_NO,
CHARGE_BATT,
CHARGE_FULL
}CHARGE_STATE_t;
typedef struct
{
INT16U Batt_Level;
INT16U Batt_Value;
INT16U Batt_LowCnt;
}BATT_INFO;
UINT16 Battery_GetLevel(void);
UINT16 Battery_GetChargeState(void);
UINT32 Battery_PowerOnCheck(void);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -