XilinxProcessorIPLib/drivers/dual_splitter/src/xdualsplitter.c
void XDualSplitter_SetImgParam(XDualSplitter *InstancePtr, u8 InputSamples,
				u8 OutputSamples, u8 ImageSegments, u8 Overlap)
{
	u32 Data;

	/* Verify arguments. */
	Xil_AssertVoid(InstancePtr != NULL);
	Xil_AssertVoid(InputSamples <= XDUSP_MAX_INPUT_SAMPLES);
	Xil_AssertVoid(OutputSamples <= XDUSP_MAX_OUTPUT_SAMPLES);
	Xil_AssertVoid(ImageSegments <= XDUSP_MAX_SEGMENTS);

	/* Calculate Image parameters to fit into 32-bit register. */
	Data = InputSamples & XDUSP_CORE_CTL_IN_SAMPLES_MASK;
	Data |= ((u32)OutputSamples <<
			XDUSP_CORE_CTL_OUT_SAMPLES_SHIFT) &
				XDUSP_CORE_CTL_OUT_SAMPLES_MASK;
	Data |= ((u32)ImageSegments <<
			XDUSP_CORE_CTL_IMG_SEG_SHIFT) &
				XDUSP_CORE_CTL_IMG_SEG_MASK;
	Data |= ((u32)Overlap <<
			XDUSP_CORE_CTL_OVRLAP_SEG_SHIFT) &
				XDUSP_CORE_CTL_OVRLAP_SEG_MASK;

	/* Write into Core Control register */
	XDualSplitter_WriteReg(InstancePtr->Config.BaseAddress,
			XDUSP_CORE_CTL_OFFSET, Data);
}
/*****************************************************************************/
/**
*
* This function sets the image parameters to split into multiple segments.
*
* @param	InstancePtr is a pointer to the XDualSplitter core instance.
* @param	InputSamples specifies the number of input samples per clock
*		that needs to be set within the range [0, 4].
* @param	OutputSamples specifies the number of output samples per clock
*		that needs to be set within the range [0, 4].
* @param	ImageSegments specifies the number of image segments
*		that needs to be set within the range [0, 4].
* @param	Overlap specifies the overlap of the samples in the segments.
*
* @return	None.
*
* @note		None.
*
******************************************************************************/
This function sets the image parameters to split into multiple segments.
This function sets the image parameters to split into multiple segments .
void XDualSplitter_SetImgParam(XDualSplitter *InstancePtr, u8 InputSamples,
				u8 OutputSamples, u8 ImageSegments, u8 Overlap)
{
	u32 Data;
	Xil_AssertVoid(InstancePtr != NULL);
	Xil_AssertVoid(InputSamples <= XDUSP_MAX_INPUT_SAMPLES);
	Xil_AssertVoid(OutputSamples <= XDUSP_MAX_OUTPUT_SAMPLES);
	Xil_AssertVoid(ImageSegments <= XDUSP_MAX_SEGMENTS);
	Data = InputSamples & XDUSP_CORE_CTL_IN_SAMPLES_MASK;
	Data |= ((u32)OutputSamples <<
			XDUSP_CORE_CTL_OUT_SAMPLES_SHIFT) &
				XDUSP_CORE_CTL_OUT_SAMPLES_MASK;
	Data |= ((u32)ImageSegments <<
			XDUSP_CORE_CTL_IMG_SEG_SHIFT) &
				XDUSP_CORE_CTL_IMG_SEG_MASK;
	Data |= ((u32)Overlap <<
			XDUSP_CORE_CTL_OVRLAP_SEG_SHIFT) &
				XDUSP_CORE_CTL_OVRLAP_SEG_MASK;
	XDualSplitter_WriteReg(InstancePtr->Config.BaseAddress,
			XDUSP_CORE_CTL_OFFSET, Data);
}
void XDualSplitter_SetImgParam ( XDualSplitter * InstancePtr , u8 InputSamples , u8 OutputSamples , u8 ImageSegments , u8 Overlap ) { u32 Data ; Xil_AssertVoid ( InstancePtr != NULL ) ; Xil_AssertVoid ( InputSamples <= XDUSP_MAX_INPUT_SAMPLES ) ; Xil_AssertVoid ( OutputSamples <= XDUSP_MAX_OUTPUT_SAMPLES ) ; Xil_AssertVoid ( ImageSegments <= XDUSP_MAX_SEGMENTS ) ; Data = InputSamples & XDUSP_CORE_CTL_IN_SAMPLES_MASK ; Data |= ( ( u32 ) OutputSamples << XDUSP_CORE_CTL_OUT_SAMPLES_SHIFT ) & XDUSP_CORE_CTL_OUT_SAMPLES_MASK ; Data |= ( ( u32 ) ImageSegments << XDUSP_CORE_CTL_IMG_SEG_SHIFT ) & XDUSP_CORE_CTL_IMG_SEG_MASK ; Data |= ( ( u32 ) Overlap << XDUSP_CORE_CTL_OVRLAP_SEG_SHIFT ) & XDUSP_CORE_CTL_OVRLAP_SEG_MASK ; XDualSplitter_WriteReg ( InstancePtr -> Config . BaseAddress , XDUSP_CORE_CTL_OFFSET , Data ) ; }
This function sets the image parameters to split into multiple segments.
This function sets the image parameters to split into multiple segments .
/* Verify arguments. */ /* Calculate Image parameters to fit into 32-bit register. */ /* Write into Core Control register */