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.

60 lines
1.2 KiB

2 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 _CUSTOMIZED_H_
#define _CUSTOMIZED_H_
#include "afc.h"
#include "qc.h"
#include "pd.h"
#include "ufcs.h"
#include "hvdcp.h"
#include "scp.h"
#include "apple_mode.h"
extern i2c_slave_msg_s g_i2c;
extern const pd_config_init_s PD_INIT_CONFIG[ADP_PORT_NUM_MAX];
extern const prl_common_ops_s PRL_COMMON_OPS;
#if AFC_SUPPORT
extern const afc_config_init_s AFC_INIT_CONFIG[][PORT_TYPE_DUAL_PORT];
#endif
#define GET_ADP_CURR_CONFIG_NUM(protocol,num)\
(g_##protocol##_curr_config->num)
#define CONFIG(prl)\
prl##_INIT_CONFIG
#define GET_ADP_INIT_CONFIG_ADR(port_num,port_type,protocol)\
(&CONFIG(protocol)[port_num][port_type])
#define get_adp_port_type_config(port_num)\
(ADP_PORT_TYPE_INIT_CONFIG[port_num])
typedef struct pwr_request_s
{
uint16_t request_vol;
uint16_t request_cur;
} pwr_request_s;
pwr_request_s def_power_request(void);
#endif