#include "../common/SPORT.h"

#include <cdefbf561.h>
#include <services/services.h>


T_SPORT_SPEC g_aSPORTspec[] = {    
		{
			false,
			false,
			ADI_INT_DMA2_0_SPORT0_RX,
			ADI_INT_DMA2_1_SPORT0_TX,
			ADI_INT_DMA2_ERROR,
			ADI_INT_SPORT0_ERROR,
			pSPORT0_TCR1,
			pSPORT0_TCR2,
			pSPORT0_RCR1,
			pSPORT0_RCR2,
			pSPORT0_TX,
			pSPORT0_RX,
			pSPORT0_STAT,
			pSPORT0_TCLKDIV,
			pSPORT0_RCLKDIV,
			pSPORT0_TFSDIV,
			pSPORT0_RFSDIV,
			pSPORT0_MCMC1,
			pSPORT0_MCMC2,
			pSPORT0_MRCS0,
			pSPORT0_MRCS1,
			pSPORT0_MRCS2,
			pSPORT0_MRCS3,
			pSPORT0_MTCS0,
			pSPORT0_MTCS1,
			pSPORT0_MTCS2,
			pSPORT0_MTCS3,
			pDMA2_0_IRQ_STATUS,
			pDMA2_0_CONFIG,
			(volatile void **)DMA2_0_START_ADDR,
			pDMA2_0_X_MODIFY,
			pDMA2_0_X_COUNT,
			pDMA2_0_CURR_X_COUNT,			
			pDMA2_0_Y_MODIFY,
			pDMA2_0_Y_COUNT,
			pDMA2_0_CURR_Y_COUNT,			
			(volatile void **)DMA2_0_NEXT_DESC_PTR,			
			pDMA2_1_IRQ_STATUS,
			pDMA2_1_CONFIG,
			(volatile void **)DMA2_1_START_ADDR,
			pDMA2_1_X_MODIFY,
			pDMA2_1_X_COUNT,
			pDMA2_1_CURR_X_COUNT,			
			pDMA2_1_Y_MODIFY,
			pDMA2_1_Y_COUNT,
			pDMA2_1_CURR_Y_COUNT,
			(volatile void **)DMA2_1_NEXT_DESC_PTR,			
		},
		{
			false,
			false,
			ADI_INT_DMA2_2_SPORT1_RX,
			ADI_INT_DMA2_3_SPORT1_TX,
			ADI_INT_DMA2_ERROR,
			ADI_INT_SPORT1_ERROR,
			pSPORT1_TCR1,
			pSPORT1_TCR2,
			pSPORT1_RCR1,
			pSPORT1_RCR2,
			pSPORT1_TX,
			pSPORT1_RX,
			pSPORT1_STAT,
			pSPORT1_TCLKDIV,
			pSPORT1_RCLKDIV,
			pSPORT1_TFSDIV,
			pSPORT1_RFSDIV,
			pSPORT1_MCMC1,
			pSPORT1_MCMC2,
			pSPORT1_MRCS0,
			pSPORT1_MRCS1,
			pSPORT1_MRCS2,
			pSPORT1_MRCS3,
			pSPORT1_MTCS0,
			pSPORT1_MTCS1,
			pSPORT1_MTCS2,
			pSPORT1_MTCS3,
			pDMA2_2_IRQ_STATUS,
			pDMA2_2_CONFIG,
			(volatile void **)DMA2_2_START_ADDR,
			pDMA2_2_X_MODIFY,
			pDMA2_2_X_COUNT,
			pDMA2_2_CURR_X_COUNT,			
			pDMA2_2_Y_MODIFY,
			pDMA2_2_Y_COUNT,
			pDMA2_2_CURR_Y_COUNT,						
			(volatile void **)DMA2_2_NEXT_DESC_PTR,						
			pDMA2_3_IRQ_STATUS,
			pDMA2_3_CONFIG,
			(volatile void **)DMA2_3_START_ADDR,
			pDMA2_3_X_MODIFY,
			pDMA2_3_X_COUNT,
			pDMA2_3_CURR_X_COUNT,			
			pDMA2_3_Y_MODIFY,
			pDMA2_3_Y_COUNT,
			pDMA2_3_CURR_Y_COUNT,
			(volatile void **)DMA2_3_NEXT_DESC_PTR,						
		}
	};
	
unsigned char g_nSPORTcount = sizeof(g_aSPORTspec) / sizeof(T_SPORT_SPEC);		//calculate the nr of elements in the array

bool sport_platformInit(unsigned char pa_cSport, bool bTxNotRx, bool bSecEnable) {
	// nothing to do
	return true;
}

