XilinxProcessorIPLib/drivers/dsitxss/examples/xdsitxss_video_test_example.c
void ConfigureChannel(u32 VdmaChannel)
{
    u8 ii = 0;
    u8 offset = 0;
    volatile u8 *BaseAddress;
    if (VdmaChannel == VDMA_MM2S) {
	*VdmaMM2SHoriSizeReg = HORIZONTAL_RESOLUTION_BYTES;
	*VdmaMM2SFrmDlrStrideReg = STRIDE;
	BaseAddress = (u32)XPAR_BRAM_0_BASEADDR;
	 while(ii < FRAME_COUNTER) {
		*(VdmaMM2SFrameBuffer0Reg + offset) = (u32)BaseAddress;
		offset = offset + 1;
		BaseAddress = BaseAddress +
		(HORIZONTAL_RESOLUTION_BYTES * VERTICAL_RESOLUTION);
		ii++;
	}
    }
    else if (VdmaChannel == VDMA_S2MM) {
	*VdmaS2MMHoriSizeReg = HORIZONTAL_RESOLUTION_BYTES;
	*VdmaS2MMFrmDlrStrideReg = STRIDE;

	BaseAddress = (u32)XPAR_BRAM_1_BASEADDR;
	while(ii < FRAME_COUNTER) {
		*(VdmaS2MMFrameBuffer0Reg + offset) = (u32)BaseAddress;
		offset = offset + 1;
		BaseAddress = BaseAddress +
		(HORIZONTAL_RESOLUTION_BYTES * VERTICAL_RESOLUTION);
		ii++;
		}
	}
}
/*****************************************************************************/
/**
*
* This function to setup Horizontal size and stride
*
* @param	VdmaChannel specifes VdmaChannel is MM2S or S2MM
*
* @return	None
*
* @note		None.
*
******************************************************************************/
This function to setup Horizontal size and stride
This function to setup Horizontal size and stride
void ConfigureChannel(u32 VdmaChannel)
{
    u8 ii = 0;
    u8 offset = 0;
    volatile u8 *BaseAddress;
    if (VdmaChannel == VDMA_MM2S) {
	*VdmaMM2SHoriSizeReg = HORIZONTAL_RESOLUTION_BYTES;
	*VdmaMM2SFrmDlrStrideReg = STRIDE;
	BaseAddress = (u32)XPAR_BRAM_0_BASEADDR;
	 while(ii < FRAME_COUNTER) {
		*(VdmaMM2SFrameBuffer0Reg + offset) = (u32)BaseAddress;
		offset = offset + 1;
		BaseAddress = BaseAddress +
		(HORIZONTAL_RESOLUTION_BYTES * VERTICAL_RESOLUTION);
		ii++;
	}
    }
    else if (VdmaChannel == VDMA_S2MM) {
	*VdmaS2MMHoriSizeReg = HORIZONTAL_RESOLUTION_BYTES;
	*VdmaS2MMFrmDlrStrideReg = STRIDE;
	BaseAddress = (u32)XPAR_BRAM_1_BASEADDR;
	while(ii < FRAME_COUNTER) {
		*(VdmaS2MMFrameBuffer0Reg + offset) = (u32)BaseAddress;
		offset = offset + 1;
		BaseAddress = BaseAddress +
		(HORIZONTAL_RESOLUTION_BYTES * VERTICAL_RESOLUTION);
		ii++;
		}
	}
}
void ConfigureChannel ( u32 VdmaChannel ) { u8 ii = 0 ; u8 offset = 0 ; volatile u8 * BaseAddress ; if ( VdmaChannel == VDMA_MM2S ) { * VdmaMM2SHoriSizeReg = HORIZONTAL_RESOLUTION_BYTES ; * VdmaMM2SFrmDlrStrideReg = STRIDE ; BaseAddress = ( u32 ) XPAR_BRAM_0_BASEADDR ; while ( ii < FRAME_COUNTER ) { * ( VdmaMM2SFrameBuffer0Reg + offset ) = ( u32 ) BaseAddress ; offset = offset + 1 ; BaseAddress = BaseAddress + ( HORIZONTAL_RESOLUTION_BYTES * VERTICAL_RESOLUTION ) ; ii ++ ; } } else if ( VdmaChannel == VDMA_S2MM ) { * VdmaS2MMHoriSizeReg = HORIZONTAL_RESOLUTION_BYTES ; * VdmaS2MMFrmDlrStrideReg = STRIDE ; BaseAddress = ( u32 ) XPAR_BRAM_1_BASEADDR ; while ( ii < FRAME_COUNTER ) { * ( VdmaS2MMFrameBuffer0Reg + offset ) = ( u32 ) BaseAddress ; offset = offset + 1 ; BaseAddress = BaseAddress + ( HORIZONTAL_RESOLUTION_BYTES * VERTICAL_RESOLUTION ) ; ii ++ ; } } }
This function to setup Horizontal size and stride
This function to setup Horizontal size and stride