3、关盖码中增加一个bit用于耳机快慢充标志,盒子电池电压低于3.55V该bit为0,反之为1; 4、取消跟随充,固定VOUT电压为4.6V输出; 5、增加盒子电压触发和取消低电报警时发送一次关盖码; 6、解决开盖触发两次灯效问题,方法:轻重载切换时,增加debounce 300ms滤波。
57 lines
1.1 KiB
C
57 lines
1.1 KiB
C
/*
|
||
******************************************************************************
|
||
*
|
||
* @file bat.h
|
||
* @brief bat module
|
||
*
|
||
*
|
||
* @version 1.0
|
||
* @date 2023/05/12 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 2023/07/12 Alex build this file
|
||
******************************************************************************
|
||
*/
|
||
|
||
#ifndef __BAT_H__
|
||
#define __BAT_H__
|
||
|
||
#include "define.h"
|
||
|
||
#define C_bat_level_protect 0
|
||
#define C_bat_level_lowpower 2
|
||
|
||
|
||
extern uint8_t bat_level;
|
||
extern uint8_t bat_level_pdata;
|
||
|
||
extern bit F_batlevel_low; //电池低压
|
||
extern bit Vox_Chg_TX_Flag;
|
||
|
||
#if BAT_VALUE
|
||
|
||
#if LED_DISPLAY
|
||
|
||
/*电池电量档位:25%一个档位。*/
|
||
|
||
#define BAT_LEVEL_25 3
|
||
#define BAT_LEVEL_50 4
|
||
#define BAT_LEVEL_75 5
|
||
#define BAT_LEVEL_100 6
|
||
#endif
|
||
|
||
extern bit F_batlevel_protect; //低电保护
|
||
|
||
|
||
extern void check_bat_level(void);
|
||
|
||
#endif
|
||
|
||
#endif
|
||
|