You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

132 lines
2.5 KiB

4 months ago
/**
******************************************************************************
* @copyright Copyright (C), 2016-2022, ConvenientPower. Co., Ltd.
* @file customized.h
* @version 1.0
* @author qing.cheng
* @date 2023-01-04
* @brief Header file of CUSTOMIZED_H module.
******************************************************************************
*/
#ifndef _PORT1_CUSTOMIZED_H_
#define _PORT1_CUSTOMIZED_H_
#define PORT1_SCP_POWER_CURVE_SUM\
ARRAY_LEN(PORT1_SCP_POWER_CURVE_BUF)
#include "core_comm.h"
#include "drv_comm.h"
#include "common.h"
#include "qc_scp_protocol.h"
#include "pd_protocol.h"
#include "tfcp_protocol.h"
#if SCP_SUPPORT
//scp reg map
extern const uint8_t port1_scp_register_value[256];
extern const scp_def_vol_s PORT1_SCP_DEF_VOL[];
//scp power curve for 0xd0~0xdf.
/*
* @brief port1_scp_register_attr_upgrade
* @param scp_param
* @note SCP deposit area properties updated
* @retval null
*/
void port1_scp_register_attr_upgrade(scp_param_s *scp_param);
/*
* @brief port0_scp_reg_hook_register
* @param scp_param
* @note port0_scp_reg_hook_register
* @retval null
*/
void port1_scp_reg_hook_register(scp_param_s *scp_param);
/*
* @brief scp_def_vol_init
* @param scp_param
* @note
* @retval
*/
void port1_scp_def_vol_init(scp_param_s *scp_param);
/**
* @brief 0xb8 b9 ba bb register reset.
* @note
* @param scp_param
* @retval void
*/
void port1_scp_mode_exit_action(scp_param_s *scp_param);
/**
* @brief port1_get_scp_powe_curve_cur
*
* @param vol
* @return uint16_t
*/
uint16_t port1_get_scp_powe_curve_cur(uint16_t vol);
/*
* @brief port1_capabiloties_features
* @param scp_prl_passist
* @note register 0x2f
* @retval NULL
*/
void port1_capabiloties_features(scp_prl_s *scp_prl_passist);
#endif
#if UFCS_SUPPORT
/*
* @brief ufcs_src_cap_init
* @param ufcs_param
* @note NULL
* @retval NULL
*/
void port1_ufcs_src_cap_init(ufcs_param_s *ufcs_param);
#endif
#if PD_SUPPORT
/*
* @brief pe_src_cable_check_callback
* @param pd_param
* @note meark信息---check emark information and update src_cap
* @retval null
*/
void port1_pe_src_cable_check_callback(pd_param_s* pd_param);
/*
* @brief port0_pd_src_cap_init
* @param pd_param
* @param pwr_cnt
* @note
* @retval null
*/
void port1_pd_src_cap_init(pd_param_s*pd_param, uint8_t pwr_cnt);
#if PD_DERAT_SUPPORT
/*
* @brief pd_power_request
* @param NULL
* @note NULL
* @retval pwr_request_s
*/
void port1_pd_src_cap_derating_update(pd_param_s *pd_param);
#endif
#endif
#endif