XilinxProcessorIPLib/drivers/tft/src/xtft.c
void XTft_SetPosChar(XTft *InstancePtr, u32 ColVal, u32 RowVal)
{
	/*
	 * Assert validates the input arguments.
	 */
	Xil_AssertVoid(InstancePtr != NULL);
	Xil_AssertVoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
	Xil_AssertVoid(ColVal <= (XTFT_DISPLAY_WIDTH - 1));
	Xil_AssertVoid(RowVal <= (XTFT_DISPLAY_HEIGHT - 1));

	/*
	 * If there is no space in the current line for the next char
	 * go to next line.
	 */
	if (ColVal > (XTFT_DISPLAY_WIDTH - 1) - XTFT_CHAR_WIDTH) {
		ColVal = XTFT_DEF_COLVAL;
		RowVal += XTFT_CHAR_HEIGHT;
	}

	/*
	 * If there is no space in the current line for the next char
	 * go to next line by deleting the first line.
	 */
	while (RowVal > (XTFT_DISPLAY_HEIGHT - 1) - XTFT_CHAR_HEIGHT) {
		XTft_Scroll(InstancePtr);
		RowVal -= XTFT_CHAR_HEIGHT;
	}

	/*
	 * Update the column, row position values.
	 */
	InstancePtr->ColVal = ColVal;
	InstancePtr->RowVal = RowVal;

}
/***************************************************************************/
/**
*
* This function changes the column, row position in the Instance structure
* of driver. It is used to correct the position for the next character to
* be written if column and row position cross limits.
*
* @param	InstancePtr is a pointer to the XTft instance.
* @param	ColVal is the column number to which ColVal member of
*		Instance structure is updated. If ColVal crosses
*		(XTFT_DISPLAY_WIDTH - 1) -  XTFT_CHAR_WIDTH, position is
*		moved to next line. The valid values are 0 to
*		(XTFT_DISPLAY_WIDTH - 1).
* @param	RowVal is the row number to which RowVal member of
*		Instance structure is updated. If RowVal crosses
*		(XTFT_DISPLAY_HEIGHT - 1)- XTFT_CHAR_HEIGHT, the first line
*		will be deleted. The valid values are 0 to
*		(XTFT_DISPLAY_HEIGHT - 1).
*
* @return	None.
*
* @note		This function differs from the function XTft_SetPos because
*		you cannot move to any position on the screen as we have
*		to check for enough space for a character to be written.
*
****************************************************************************/
This function changes the column, row position in the Instance structure
of driver. It is used to correct the position for the next character to
be written if column and row position cross limits.
This function changes the column row position in the Instance structure of driver . It is used to correct the position for the next character to be written if column and row position cross limits .
void XTft_SetPosChar(XTft *InstancePtr, u32 ColVal, u32 RowVal)
{
	Xil_AssertVoid(InstancePtr != NULL);
	Xil_AssertVoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
	Xil_AssertVoid(ColVal <= (XTFT_DISPLAY_WIDTH - 1));
	Xil_AssertVoid(RowVal <= (XTFT_DISPLAY_HEIGHT - 1));
	if (ColVal > (XTFT_DISPLAY_WIDTH - 1) - XTFT_CHAR_WIDTH) {
		ColVal = XTFT_DEF_COLVAL;
		RowVal += XTFT_CHAR_HEIGHT;
	}
	while (RowVal > (XTFT_DISPLAY_HEIGHT - 1) - XTFT_CHAR_HEIGHT) {
		XTft_Scroll(InstancePtr);
		RowVal -= XTFT_CHAR_HEIGHT;
	}
	InstancePtr->ColVal = ColVal;
	InstancePtr->RowVal = RowVal;
}
void XTft_SetPosChar ( XTft * InstancePtr , u32 ColVal , u32 RowVal ) { Xil_AssertVoid ( InstancePtr != NULL ) ; Xil_AssertVoid ( InstancePtr -> IsReady == XIL_COMPONENT_IS_READY ) ; Xil_AssertVoid ( ColVal <= ( XTFT_DISPLAY_WIDTH - 1 ) ) ; Xil_AssertVoid ( RowVal <= ( XTFT_DISPLAY_HEIGHT - 1 ) ) ; if ( ColVal > ( XTFT_DISPLAY_WIDTH - 1 ) - XTFT_CHAR_WIDTH ) { ColVal = XTFT_DEF_COLVAL ; RowVal += XTFT_CHAR_HEIGHT ; } while ( RowVal > ( XTFT_DISPLAY_HEIGHT - 1 ) - XTFT_CHAR_HEIGHT ) { XTft_Scroll ( InstancePtr ) ; RowVal -= XTFT_CHAR_HEIGHT ; } InstancePtr -> ColVal = ColVal ; InstancePtr -> RowVal = RowVal ; }
This function changes the column, row position in the Instance structure
of driver.
This function changes the column row position in the Instance structure of driver .
/*
	 * Assert validates the input arguments.
	 */ /*
	 * If there is no space in the current line for the next char
	 * go to next line.
	 */ /*
	 * If there is no space in the current line for the next char
	 * go to next line by deleting the first line.
	 */ /*
	 * Update the column, row position values.
	 */