Both_Way_Comm_SY8833/TP3310_Demo.si4project/Backup/charger_module(5869).h

66 lines
1.4 KiB
C
Raw Permalink 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 Charger_module.h
* @brief charger 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 __CHARGER_MODULE_H__
#define __CHARGER_MODULE_H__
#include "define.h"
#if 0
// 充电状态定义
typedef enum
{
CHG_STA_ING, // 充电中
CHG_STA_COMPLETED, // 充电完成
CHG_STA_PULLOUT, // 充电器拔出
} TE_CHG_STA;
extern idata TE_CHG_STA ChgStatus; // 系统状态定义
#endif
extern bit Charger_Done;
#if CHARGER_ENABLE
/*充电电流设置在系统初始化时通过配置寄存器REG_CHG1配置。
REG_CHG1 = CHG_CURRENT_300MA;
*/
#define CHG_CURRENT_100MA 0x00
#define CHG_CURRENT_200MA 0x01
#define CHG_CURRENT_250MA 0x02
#define CHG_CURRENT_300MA 0x03
#define CHG_CURRENT_350MA 0x04
#define CHG_CURRENT_400MA 0x05
#define CHG_CURRENT_450MA 0x06
#define CHG_CURRENT_500MA 0x07
#define CHG_CONSTANT_CUR_TIM 1
#define DIE_OT_RECOVER_TIM 25 //NTC保护后恢复正常后等待250ms重新开启充电
extern void Charger_Handler(void);
#endif
#endif