/** ****************************************************************************** * @copyright Copyright (C), 2016-2022, ConvenientPower. Co., Ltd. * @file ufcs_pe_func.h * @version 1.0 * @author qing.cheng * @date 2022-12-02 * @brief Header file of UFCS_PE_FUNC_H module. ****************************************************************************** */ #ifndef _UFCS_PE_FUNC_H_ #define _UFCS_PE_FUNC_H_ #include "ufcs_app.h" typedef void (*f_ufcs_pe_action)(uint8_t port, ufcs_param_s* ufcs_param); void ufcs_callback_func_init(uint8_t port, ufcs_param_s *ufcs_param); /* * @brief ufcs_pe_request_deal * @param ufcs_param * @note * @retval NULL */ void ufcs_pe_request_deal(uint8_t port, ufcs_param_s *ufcs_param); /* * @brief ufcs_pe_run * @param port * @param ufcs_param * @note * @retval NULL */ void ufcs_pe_run(uint8_t port, ufcs_param_s *ufcs_param); /* * @brief UFCS_PE_SRC_Send_Hard_Reset_GoTo_Default * @param port * @param ufcs_param * @note * @retval NULL */ void UFCS_PE_SRC_Send_Hard_Reset_GoTo_Default(uint8_t port, ufcs_param_s *ufcs_param); /* * @brief UFCS_PE_Rest_action * @param port * @param ufcs_assist * @note * @retval NULL */ void UFCS_PE_Rest_action(uint8_t port, ufcs_assist_s *ufcs_assist); /* * @brief ufcs_pe_reset * @param port * @param ufcs_param * @note * @retval NULL */ void ufcs_pe_reset(uint8_t port, ufcs_param_s *ufcs_param); /* * @brief UFCS_PE_SRC_Startup_action * @param port * @param ufcs_param * @note * @retval NULL */ void UFCS_PE_SRC_Startup_action(uint8_t port, ufcs_param_s *ufcs_param); /* * @brief ufcs_src_error_info_msg_assemble * @param port * @param ufcs_param * @note * @retval NULL */ uint8_t ufcs_src_error_info_msg_assemble(uint8_t port, ufcs_param_s *ufcs_param); /* * @brief ufcs_src_ctrl_msg_assemble * @param port * @param ufcs_param * @param ctrl_order * @param target_addr_dev * @note * @retval NULL */ void ufcs_src_ctrl_msg_assemble(uint8_t port, ufcs_param_s *ufcs_param, uint8_t ctrl_order, uint8_t target_addr_dev); /* * @brief ufcs_src_data_msg_assemble * @param port * @param ufcs_param * @param dat_cmd * @param target_dev * @note * @retval NULL */ void ufcs_src_data_msg_assemble(uint8_t port, ufcs_param_s *ufcs_param, uint8_t dat_cmd, uint8_t target_dev); /* * @brief ufcs_src_info_msg_assemble * @param port * @param ufcs_assist * @param dat_cmd * @note * @retval NULL */ uint8_t ufcs_src_info_msg_assemble(uint8_t port, ufcs_param_s *ufcs_param, uint8_t dat_cmd); /* * @brief ufcs_src_deal_ctrl_packet * @param port * @param ufcs_param_s *ufcs_param * @note * @retval NULL */ void ufcs_src_deal_ctrl_packet(uint8_t port, ufcs_param_s *ufcs_param); /* * @brief ufcs_src_deal_data_packet * @param port * @param ufcs_param_s *ufcs_param * @note * @retval NULL */ void ufcs_src_deal_data_packet(uint8_t port, ufcs_param_s *ufcs_param); /* * @brief ufcs_src_hw_vdm_deal_packet * @param port * @param ufcs_param_s *ufcs_param * @note * @retval NULL */ void ufcs_src_hw_vdm_deal_packet(uint8_t port, ufcs_param_s *ufcs_param); /* * @brief ufcs_src_deal_vdm_packet * @param port * @param ufcs_param_s *ufcs_param * @note * @retval NULL */ void ufcs_src_deal_vdm_packet(uint8_t port, ufcs_param_s *ufcs_param); /* * @brief UFCS_PE_SRC_Ready_packet_deal * @param port * @param *ufcs_param * @note * @retval NULL */ void UFCS_PE_SRC_Ready_packet_deal(uint8_t port, ufcs_param_s *ufcs_param); /* * @brief UFCS_PE_Status_Exit_common * @param port * @param *ufcs_param * @note * @retval NULL */ void UFCS_PE_Status_Exit_common(uint8_t port, ufcs_param_s *ufcs_param); /* * @brief UFCS_PE_SRC_Send_Info_common * @param port * @param *ufcs_param * @note * @retval NULL */ void UFCS_PE_SRC_Send_Info_common(uint8_t port, ufcs_param_s *ufcs_param, data_cmd_e cmd); /* * @brief UFCS_PE_SRC_Ready_action * @param port * @param *ufcs_param * @note * @retval NULL */ void UFCS_PE_SRC_Ready_action(uint8_t port, ufcs_param_s *ufcs_param); /* * @brief UFCS_PE_SRC_Send_Output_Capabilities_action * @param port * @param *ufcs_param * @note * @retval NULL */ void UFCS_PE_SRC_Send_Output_Capabilities_action(uint8_t port, ufcs_param_s *ufcs_param); /* * @brief UFCS_PE_SRC_Send_Source_Information_action * @param port * @param *ufcs_param * @note * @retval NULL */ void UFCS_PE_SRC_Send_Source_Information_action(uint8_t port, ufcs_param_s *ufcs_param); /* * @brief UFCS_PE_SRC_Send_Device_Information_action * @param port * @param *ufcs_param * @note * @retval NULL */ void UFCS_PE_SRC_Send_Device_Information_action(uint8_t port, ufcs_param_s *ufcs_param); /* * @brief UFCS_PE_SRC_Send_Error_Information_action * @param port * @param *ufcs_param * @note * @retval NULL */ void UFCS_PE_SRC_Send_Error_Information_action(uint8_t port, ufcs_param_s *ufcs_param); /* * @brief ufcs_pwr_snk_req_evaluate * @param port * @param *data * @note * @retval NULL */ void ufcs_pwr_snk_req_evaluate(uint8_t port, ufcs_param_s *ufcs_param); /* * @brief UFCS_PE_SRC_Negotiate_Capability_action * @param port * @param *ufcs_param * @note * @retval NULL */ void UFCS_PE_SRC_Negotiate_Capability_action(uint8_t port, ufcs_param_s *ufcs_param); /* * @brief UFCS_PE_SRC_Test_action * @param port * @param *ufcs_param * @note * @retval NULL */ void UFCS_PE_SRC_Test_action(uint8_t port, ufcs_param_s *ufcs_param); /* * @brief ufcs_prl_config_dog * @param port * @param *ufcs_param * @note * @retval NULL */ void ufcs_prl_config_dog(uint8_t port, ufcs_param_s *ufcs_param); /* * @brief UFCS_PE_SRC_Send_Accept_action * @param port * @param *ufcs_param * @note * @retval NULL */ void UFCS_PE_SRC_Send_Accept_action(uint8_t port, ufcs_param_s *ufcs_param); /* * @brief UFCS_PE_SRC_Send_Refuse_action * @param port * @param *ufcs_param * @note * @retval NULL */ void UFCS_PE_SRC_Send_Refuse_action(uint8_t port, ufcs_param_s *ufcs_param); /* * @brief UFCS_PE_SRC_send_Supply_psrdy_action * @param port * @param *ufcs_param * @note * @retval NULL */ void UFCS_PE_SRC_send_Supply_psrdy_action(uint8_t port, ufcs_param_s *ufcs_param); /* * @brief UFCS_PE_SRC_Init_Start_Cable_Detect_action * @param port * @param *ufcs_param * @note * @retval NULL */ void UFCS_PE_SRC_Init_Start_Cable_Detect_action(uint8_t port, ufcs_param_s *ufcs_param); /* * @brief UFCS_PE_SRC_Get_Device_Info_action * @param port * @param *ufcs_param * @note * @retval NULL */ void UFCS_PE_SRC_Get_Device_Info_action(uint8_t port, ufcs_param_s *ufcs_param); /* * @brief UFCS_PE_SRC_Send_Verify_Response_action * @param port * @param *ufcs_param * @note * @retval NULL */ void UFCS_PE_SRC_Send_Verify_Response_action(uint8_t port, ufcs_param_s *ufcs_param); /* * @brief UFCS_PE_SRC_Get_Cable_Info_action * @param port * @param *ufcs_param * @note * @retval NULL */ void UFCS_PE_SRC_Get_Cable_Info_action(uint8_t port, ufcs_param_s *ufcs_param); /* * @brief UFCS_PE_SRC_Wait_End_Cable_Detect_action * @param port * @param *ufcs_param * @note * @retval NULL */ void UFCS_PE_SRC_Wait_End_Cable_Detect_action(uint8_t port, ufcs_param_s *ufcs_param); /* * @brief UFCS_PE_SRC_Send_Cable_HardReset_action * @param port * @param *ufcs_param * @note * @retval NULL */ void UFCS_PE_SRC_Send_Cable_HardReset_action(uint8_t port, ufcs_param_s *ufcs_param); /* * @brief UFCS_PE_SRC_Send_Power_Change_action * @param port * @param *ufcs_param * @note * @retval NULL */ void UFCS_PE_SRC_Send_Power_Change_action(uint8_t port, ufcs_param_s *ufcs_param); /* * @brief UFCS_PE_SRC_Reserved_action * @param *ufcs_param * @note * @retval NULL */ void UFCS_PE_SRC_Reserved_action(uint8_t port, ufcs_param_s *ufcs_param); /* * @brief UFCS_PE_SRC_request_information_action * @param *ufcs_param * @note * @retval NULL */ void UFCS_PE_SRC_request_information_action(uint8_t port, ufcs_param_s *ufcs_param); /* * @brief UFCS_PE_SRC_Send_End_Cable_Detect_action * @param port * @param *ufcs_param * @note * @retval NULL */ void UFCS_PE_SRC_Send_End_Cable_Detect_action(uint8_t port, ufcs_param_s *ufcs_param); /* * @brief UFCS_PE_SRC_Send_Cable_Info_action * @param port * @param *ufcs_param * @note * @retval NULL */ void UFCS_PE_SRC_Send_Cable_Info_action(uint8_t port, ufcs_param_s *ufcs_param); /* * @brief UFCS_PE_SRC_Send_Soft_Reset_action * @param port * @param *ufcs_param * @note * @retval NULL */ void UFCS_PE_SRC_Send_Soft_Reset_action(uint8_t port, ufcs_param_s *ufcs_param); /* * @brief ufcs_softreset_fuc * @param port * @param *ufcs_param * @note * @retval NULL */ void ufcs_softreset_fuc(uint8_t port, ufcs_param_s *ufcs_param); /* * @brief ufcs_reset_handler * @param port * @param *ufcs_param * @note * @retval NULL */ void ufcs_reset_handler(uint8_t port, ufcs_param_s *ufcs_param); /* * @brief UFCS_PE_SRC_Transition_to_default_action * @param port * @param *ufcs_param * @note * @retval NULL */ void UFCS_PE_SRC_Transition_to_default_action(uint8_t port, ufcs_param_s *ufcs_param); ///* // * @brief ufcs_pe_src_reserved_action // * @param port // * @param *data // * @note // * @retval NULL //*/ //void ufcs_pe_src_reserved_action(uint8_t port, ufcs_param_s *ufcs_param); /* * @brief ufcs_src_vdm_dat_msg_assemble * @param port * @param *ufcs_param * @note * @retval NULL */ void ufcs_src_vdm_dat_msg_assemble(uint8_t port, ufcs_param_s *ufcs_param); /* * @brief UFCS_PE_SRC_Give_Vdm_Info_action * @param port * @param *ufcs_param * @note * @retval NULL */ void UFCS_PE_SRC_Give_Vdm_Info_action(uint8_t port, ufcs_param_s *ufcs_param); /* * @brief ufcs_src_verify_resp_msg_assemble * @param port * @param *ufcs_param * @note * @retval NULL */ uint8_t ufcs_src_verify_resp_msg_assemble(uint8_t port, ufcs_param_s *ufcs_param); /* * @brief ufcs_derating_func * @param port * @param *ufcs_param * @param otp_derate_flag * @note * @retval NULL */ void ufcs_derating_func(uint8_t port, ufcs_param_s *ufcs_param, uint8_t otp_derate_flag); /* * @brief ufcs_src_cap_set * @param port * @param *ufcs_assist * @param *src_cap * @param pdo_cnt * @note * @retval NULL */ void ufcs_src_cap_set(uint8_t port, ufcs_assist_s* ufcs_assist, uint64_t *src_cap, uint8_t pdo_cnt); /* * @brief ufcs_protocol_reset * @param port * @param *ufcs_param * @note * @retval NULL */ void ufcs_protocol_reset(uint8_t port, ufcs_param_s *ufcs_param); /* * @brief ufcs_protocol_default_init * @param port * @param *ufcs_param * @note * @retval NULL */ void ufcs_protocol_default_init(uint8_t port, ufcs_param_s *ufcs_param); /* * @brief ufcs_protocol_run * @param port * @param *ufcs_param * @note * @retval NULL */ void ufcs_protocol_run(uint8_t port, ufcs_param_s *ufcs_param); #endif