/**
	******************************************************************************
	* @file
	* @author
	* @version
	* @date
	* @brief
	* @function List:
	******************************************************************************
	* @attention
	*
	*
	* <h2><center>&copy; COPYRIGHT 2021 </center></h2>
	******************************************************************************
	* @History:
	* @Author:
	* @Data:
	* @Version:
*/
/*******************************************************************************
*   Includes
*******************************************************************************/
#include "Com.h"
#if(STD_ON == CANIF_SUPPORT_OSEK_NM)
#include "Ls_Nm.h"
#endif
#include "Dem.h"
#include "fault_detect.h"
#include "can_app.h"
/*****************************************************************************
* Include Files
*****************************************************************************/
#include "common_types.h"
#include "common_memory.h"
#include "Can.h"
#include "CanIf.h"
#include "Com.h"
#include "CanTrcv.h"
#include "Dcm.h"
#include "CanTp.h"

//#include "common_timer.h"
#include "key_app.h"
#include "gpio_cfg.h"
#include "common_memory.h"

//#include "OsekNm.h"
#include "Com_Cfg.h"

#include "crc.h"
#include "cpu.h"


/*PRQA S 1503,2987++*/
//發送前置  可以添加功能安全相關處理
void Com_TxIpduCallout(PduIdType PduId)
{
}
//接收前置   可以添加功能安全相關處理
void Com_RxIpduCallout(PduIdType PduId)
{
}

/**********以下是發送相關的*************************/
//
/*發送確認--SWS R 4A8*/
void AppIpduSteering_RIGHT_switch_4A8_Conf(void)
{
	app_sig_sws_r_multimedia_tx_conf();
	app_sig_sws_r_left_menu_tx_conf();
	app_sig_sws_r_voicd_expand_2_tx_conf();
	app_sig_sws_r_auto_show_in_tx_conf();
	app_sig_sws_r_auto_show_out_tx_conf();
	app_sig_sws_r_mileage_clear_tx_conf();
	AppCan_EventSig_SWS_R_MediaReset_TxConf();
	AppCan_EventSig_SWS_R_OtherRecover_TxConf();
}
/*發送超時--SWS R 4A8*/
void AppIpduSteering_RIGHT_switch_4A8_TxTOIndication(void)
{
	uint8_t i;

	for(i = 0; i < 8; i ++)
	{
		TxIpduSteering_RIGHT_switch_4A8._c[i] = TxIpduSteering_RIGHT_switch_4A8DefualtValue._c[i];
	}
}

/*發送確認--SWS L 3B0*/
void AppIpduSteering_LEFT_switch_3B0_Conf(void)
{
	TxIpduSteering_LEFT_switch_3B0.IpduSteering_LEFT_switch_3B0.SWS_L_rolling_count ++;
	TxIpduSteering_LEFT_switch_3B0.IpduSteering_LEFT_switch_3B0.SWS_L_checksum = crc_8_for_sa3f(&(TxIpduSteering_LEFT_switch_3B0._c[0]), 7);
}
/*發送超時--SWS L 3B0*/
void AppIpduSteering_LEFT_switch_3B0_TxTOIndication(void)
{
	uint8_t i;

	for(i = 0; i < 8; i ++)
	{
		TxIpduSteering_LEFT_switch_3B0._c[i] = TxIpduSteering_LEFT_switch_3B0DefualtValue._c[i];
	}

}
/*發送確認--SWS C 429*/
void AppIpduSteering_customization_switch_429_Conf(void)
{
}
/*發送超時--SWS C 429*/
void AppIpduSteering_customization_switch_429_TxTOIndication(void)
{
	uint8_t i;

	for(i = 0; i < 8; i ++)
	{
		TxIpduSteering_customization_switch_429._c[i] = TxIpduSteering_customization_switch_429DefualtValue._c[i];
	}

}

 
/**********以下是接收相關的*************************/

void AppIpduMPC_316_Ind(void)
{
  app_mpc_316_rx_conf();
}
void AppIpduMETER_055_Ind(void)
{
  app_meter_055_rx_conf();
}
void AppIpduBCM_1_12D_Ind(void)
{
  app_bcm_1_12d_rx_conf();
}
void AppIpduBCM_2_50D_Ind(void)
{
  app_bcm_2_50d_rx_conf();
}
void AppIpduMOD_4G_49A_Ind(void)
{
  app_mod_4g_49a_rx_conf();
}
void AppIpduMultimedia_385_Ind(void)
{
  app_multimedia_385_rx_conf();
}
void AppIpduCloud_services_0A2_Ind(void)
{
  app_cloud_services_0a2_rx_conf();
}
void AppIpduBCM_EvP2_394_Ind(void)
{
  app_bcm_evp2_394_rx_conf();
}
void AppIpduAir_condition_ctrl_2DB_Ind(void)
{
  app_air_condition_ctrl_2db_rx_conf();
}
void AppIpduVCU_40D_Ind(void)
{
  app_vcu_40d_rx_conf();
}
void AppIpduBCM_L_407_Ind(void)
{
  app_bcm_l_407_rx_conf();
}
void AppIpduMETER_1_dir_4BF_Ind(void)
{
  app_meter_1_dir_4bf_rx_conf();
}

void AppIpduBCM_R_4E6_Ind(void)
{
  app_bcm_r_4e6_rx_conf();
}

void AppIpduHEAT_4C1_Ind(void)
{
  app_bcm_heat_4c1_rx_conf();
}

void AppIpduAds_29C_Ind(void)
{
  app_ads_29c_rx_conf();
}

void AppIpduMPC_316_TimeOutInd(void)
{
  app_mpc_316_to_conf();
}
void AppIpduMETER_055_TimeOutInd(void)
{
  app_meter_055_to_conf();
}
void AppIpduBCM_1_12D_TimeOutInd(void)
{
  app_bcm_1_12d_to_conf();
}
void AppIpduBCM_2_50D_TimeOutInd(void)
{
  app_bcm_2_50d_to_conf();
}
void AppIpduMOD_4G_49A_TimeOutInd(void)
{
  app_mod_4g_49a_to_conf();
}
void AppIpduMultimedia_385_TimeOutInd(void)
{
  app_multimedia_385_to_conf();
}

void AppIpduCloud_services_0A2_TimeOutInd(void)
{
  app_cloud_services_0a2_to_conf();
}

void AppIpduBCM_EvP2_394_TimeOutInd(void)
{
  app_bcm_evp2_394_to_conf();
}

void AppIpduAir_condition_ctrl_2DB_TimeOutInd(void)
{
  app_air_condition_ctrl_2db_to_conf();
}

void AppIpduVCU_40D_TimeOutInd(void)
{
  app_vcu_40d_to_conf();
}

void AppIpduBCM_L_407_TimeOutInd(void)
{
  app_bcm_l_407_to_conf();
}

void AppIpduMETER_1_dir_4BF_TimeOutInd(void)
{
  app_meter_1_dir_4bf_to_conf();
}

void AppIpduBCM_R_4E6_TimeOutInd(void)
{
  app_bcm_r_4e6_to_conf();
}

void AppIpduHEAT_4C1_TimeOutInd(void)
{
  app_bcm_heat_4c1_to_conf();
}

void AppIpduADS_29C_TimeOutInd(void)
{
  app_ads_29c_to_conf();
}












