/*
 * Port_Config_Letter.c
 *
 *  Created on: 2024年7月4日
 *      Author: Administrator
 */
#include "MSP/Port_Config_Letter.h"

void FDCAN_Port_Cofig(uint8_t FDCAN_CH_Sub, uint8_t *FDcan_Type)
{

	if(FDCAN_CH_Sub==1)
	{
		*FDcan_Type=DF_BSP_InterCall_FDCAN1_RxFifo0Callback;
	}
	else if(FDCAN_CH_Sub==2)
	{
		*FDcan_Type=DF_BSP_InterCall_FDCAN2_RxFifo0Callback;
	}
}


void RS485_SBUS_Port_Cofig(UART_HandleTypeDef *huart_, uint8_t *RS485_Type)
{

	if(huart_->Instance == UART4)			//**DEBUG
	{
		*RS485_Type=DF_BSP_InterCall_DEBUG_RxCpltCallback;
	}
	else if(huart_->Instance == USART1)		//**RS485_1
	{
		*RS485_Type=DF_BSP_InterCall_RS485_1_RxCpltCallback;
	}
	else if(huart_->Instance == USART3)		//**RS485_2
	{
		*RS485_Type=DF_BSP_InterCall_RS485_2_RxCpltCallback;
	}
	else if(huart_->Instance == USART6)		//**RS485_3
	{
		*RS485_Type=DF_BSP_InterCall_RS485_3_RxCpltCallback;

	}
	else if(huart_->Instance == UART7)		//**RS485_4
	{
		*RS485_Type=DF_BSP_InterCall_RS485_4_RxCpltCallback;
	}
	else if(huart_->Instance == USART2)		//**E22	// External serial port
	{
		*RS485_Type=DF_BSP_InterCall_E22_Serial_RxCpltCallback;
	}
	else if(huart_->Instance == UART5)		//**E28	// SBUS
	{
		*RS485_Type=DF_BSP_InterCall_E28_SBUS_RxFifo0Callback;
	}
}
