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.

76 lines
1.8 KiB

4 months ago
#ifndef __TASK_DEFINE_H__
#define __TASK_DEFINE_H__
//#include "drv_pd_phy.h"
#include "comp_uart.h"
#include "comp_config.h"
//#define log_info comp_uart2_sync_print
#define DISABLE_INT clr_EA;
#define ENABLE_INT set_EA;
#ifdef DETAIL_MODE
#define PRNT_FUNC //printf("%s\n", __func__);
#else
#define PRNT_FUNC
#endif
#define PRNT(s) //log_info("%s\n", s);
#define PRNT_C //log_info("c%d\n", pd_param->typec_status.typec_status);
#define PRNT_S //log_info("s%d\n", pd_param->pd_pe_status.pe_status);
#define PRNT_HR //log_info("h%d\n", pd_prl_hr_status);
#define PRNT_TX //log_info("t%d\n", pd_param->pd_prl_status.prl_tx_status);
#define PRNT_RX //log_info("r%d\n", pd_param->pd_prl_status.prl_rx_status);
//#define TYPEC_SRC
#define TYPEC_SNK
//#define TYPEC_DRP
//#define TYPEC_TRYSRC
//#define TYPEC_TRYSNK
//#define TYPEC_ACCESSORY
#define SOFT_CC_DET
#define VID_CONSTANT_L 0x5C
#define VID_CONSTANT_H 0x31
#define PID_CONSTANT_L 0x60
#define PID_CONSTANT_H 0x88
#define MANU_STR(a) (a == 0)?"ConvinientPower":"Not Supported"
#define MANU_STR_LEN(a) (a == 0)?15:13
#define PD3_0
#ifdef PD3_0
#define PD_VER 2
#else
#define PD_VER 1
#endif
#define NEW_PD_VERSION(msg_ver, supported_ver) \
((msg_ver) < 3 ? \
((msg_ver) < (supported_ver) ? (msg_ver) : (supported_ver)) \
: 1)
#define PD_PDO_UNI_TYPE_FPS 0x00
#define PD_PDO_UNI_TYPE_PPS 0x01
#define PD_PDO_UNI_TYPE_UNKOWN 0xFF
/*reg pd type*/
#define PD_PDO_TYPE_FIXED 0x00
#define PD_PDO_TYPE_BAT 0x01
#define PD_PDO_TYPE_VAR 0x02
#define PD_PDO_TYPE_AUG 0x03
#define PD_PDO_AUG_TYPE_SPR 0x00
#define PD_PDO_AUG_TYPE_EPR 0x01
/**************PD config****************************/
#define CFG_PD_SRC_EPR
#define CFG_PD_CHUNKED_EXT_MSG
#define CFG_PD_LONG_PKT
#endif