/* ****************************************************************************** * * @file discharge_module.h * @brief discharge module * @ic sy8837 * * @version 1.0 * @date 2024/12/02 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/12/02 Alex build this file ****************************************************************************** */ #ifndef __DISCHARGE_MODULE_H__ #define __DISCHARGE_MODULE_H__ /*_____ I N C L U D E S ____________________________________________________*/ #include "define.h" #if DISCHARGE_ENABLE /******************************************************************************\ Macro definitions \******************************************************************************/ /* Boost VOUT Control Register */ #define Boost_En_Pos (7U) #define Boost_En_Msk (0x1UL << Boost_En_Pos) #define Boost_En Boost_En_Msk #define Boost_DirIn_Pos (6U) #define Boost_DirIn_Msk (0x1UL << Boost_DirIn_Pos) #define Boost_DirIn Boost_DirIn_Msk #define Boost_Vout_3_65V (0x00) #define Boost_Vout_3_675V (0x01) #define Boost_Vout_3_70V (0x02) #define Boost_Vout_3_725V (0x03) #define Boost_Vout_3_75V (0x04) #define Boost_Vout_3_775V (0x05) #define Boost_Vout_3_80V (0x06) #define Boost_Vout_3_825V (0x07) #define Boost_Vout_3_85V (0x08) #define Boost_Vout_3_875V (0x09) #define Boost_Vout_3_90V (0x0A) #define Boost_Vout_3_925V (0x0B) #define Boost_Vout_3_95V (0x0C) #define Boost_Vout_3_975V (0x0D) #define Boost_Vout_4_00V (0x0E) #define Boost_Vout_4_025V (0x0F) #define Boost_Vout_4_05V (0x10) #define Boost_Vout_4_075V (0x11) #define Boost_Vout_4_10V (0x12) #define Boost_Vout_4_125V (0x13) #define Boost_Vout_4_15V (0x14) #define Boost_Vout_4_175V (0x15) #define Boost_Vout_4_20V (0x16) #define Boost_Vout_4_225V (0x17) #define Boost_Vout_4_25V (0x18) #define Boost_Vout_4_275V (0x19) #define Boost_Vout_4_30V (0x1A) #define Boost_Vout_4_325V (0x1B) #define Boost_Vout_4_35V (0x1C) #define Boost_Vout_4_375V (0x1D) #define Boost_Vout_4_40V (0x1E) #define Boost_Vout_4_425V (0x1F) #define Boost_Vout_4_45V (0x20) #define Boost_Vout_4_475V (0x21) #define Boost_Vout_4_50V (0x22) #define Boost_Vout_4_525V (0x23) #define Boost_Vout_4_55V (0x24) #define Boost_Vout_4_575V (0x25) #define Boost_Vout_4_60V (0x26) #define Boost_Vout_4_625V (0x27) #define Boost_Vout_4_65V (0x28) #define Boost_Vout_4_675V (0x29) #define Boost_Vout_4_70V (0x2A) #define Boost_Vout_4_725V (0x2B) #define Boost_Vout_4_75V (0x2C) #define Boost_Vout_4_775V (0x2D) #define Boost_Vout_4_80V (0x2E) #define Boost_Vout_4_825V (0x2F) #define Boost_Vout_4_85V (0x30) #define Boost_Vout_4_875V (0x31) #define Boost_Vout_4_90V (0x32) #define Boost_Vout_4_925V (0x33) #define Boost_Vout_4_95V (0x34) #define Boost_Vout_4_975V (0x35) #define Boost_Vout_5_00V (0x36) #define Boost_Vout_5_025V (0x37) #define Boost_Vout_5_05V (0x38) #define Boost_Vout_5_075V (0x39) #define Boost_Vout_5_10V (0x3A) #define Boost_Vout_5_125V (0x3B) #define Boost_Vout_5_15V (0x3C) #define Boost_Vout_5_175V (0x3D) #define Boost_Vout_5_20V (0x3E) #define Boost_Vout_5_225V (0x3F) /******************************************************************************\ Variables definitions \******************************************************************************/ #ifdef NTC_ENABLE extern bit Boost_NTC_Pro_Flag; #endif extern bit gBoost_Prepared_Flag; //BoostÂú×㿪ÆôÌõ¼þ¡£ /******************************************************************************\ Functions definitions \******************************************************************************/ extern void DisCharge_Boost_Open(uint8_t Boost_ptm ,uint8_t Vout_Cfg); extern void DisCharge_Boost_Close(void); extern void DisCharge_Handler(void); #endif #endif