XilinxProcessorIPLib/drivers/tft/src/xtft.c
void XTft_Write(XTft *InstancePtr, u8 CharValue)
{
	/*
	 * Assert validates the input arguments.
	 */
	Xil_AssertVoid(InstancePtr != NULL);
	Xil_AssertVoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);

	/*
	 * First two cases handle the special input values
	 * and default case performs a character write operation
	 * and it updates the column position in the instance structure.
	 */
	switch (CharValue) {
		case 0xd:
			/*
			 * Action to be taken for carriage return.
			 */
			XTft_SetPos(InstancePtr, XTFT_DEF_COLVAL,
					InstancePtr->RowVal);
			break;
		case 0xa:
			/*
			 * Action to be taken for line feed.
			 */
			XTft_SetPos(InstancePtr, XTFT_DEF_COLVAL,
				InstancePtr->RowVal + XTFT_CHAR_HEIGHT);
			break;
		default:
			/*
			 * Set the position and write the character and
			 * update the column position by width of
			 * character.
			 */
			XTft_SetPosChar(InstancePtr, InstancePtr->ColVal,
					InstancePtr->RowVal);
			XTft_WriteChar(
				InstancePtr, CharValue,
				InstancePtr->ColVal, InstancePtr->RowVal,
				InstancePtr->FgColor, InstancePtr->BgColor);

			InstancePtr->ColVal += XTFT_CHAR_WIDTH;
			break;
	}

}
/***************************************************************************/
/**
*
* This function performs one of the following three operations based on the
* CharValue passed :
* - Move the position to the next line at the same position.
* - Move the position to the next line.
* - Write a particular character and update the column position by the
*   width of the character.
*
* @param	InstancePtr is a pointer to the XTft instance.
* @param	CharValue is the ASCII code value of the character to be
*		written.
*
* @return	None.
*
* @note		As the character bitmap array does not support some of the
*		ASCII values, to support some of those which carry
*		significance in display are added in the switch case. If
*		there is a necessity for any other characters, it can be
*		added here.
*
****************************************************************************/
This function performs one of the following three operations based on the
CharValue passed :
Move the position to the next line at the same position.
Move the position to the next line.
Write a particular character and update the column position by the
width of the character.
This function performs one of the following three operations based on the CharValue passed : Move the position to the next line at the same position . Move the position to the next line . Write a particular character and update the column position by the width of the character .
void XTft_Write(XTft *InstancePtr, u8 CharValue)
{
	Xil_AssertVoid(InstancePtr != NULL);
	Xil_AssertVoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY);
	switch (CharValue) {
		case 0xd:
			XTft_SetPos(InstancePtr, XTFT_DEF_COLVAL,
					InstancePtr->RowVal);
			break;
		case 0xa:
			XTft_SetPos(InstancePtr, XTFT_DEF_COLVAL,
				InstancePtr->RowVal + XTFT_CHAR_HEIGHT);
			break;
		default:
			XTft_SetPosChar(InstancePtr, InstancePtr->ColVal,
					InstancePtr->RowVal);
			XTft_WriteChar(
				InstancePtr, CharValue,
				InstancePtr->ColVal, InstancePtr->RowVal,
				InstancePtr->FgColor, InstancePtr->BgColor);
			InstancePtr->ColVal += XTFT_CHAR_WIDTH;
			break;
	}
}
void XTft_Write ( XTft * InstancePtr , u8 CharValue ) { Xil_AssertVoid ( InstancePtr != NULL ) ; Xil_AssertVoid ( InstancePtr -> IsReady == XIL_COMPONENT_IS_READY ) ; switch ( CharValue ) { case 0xd : XTft_SetPos ( InstancePtr , XTFT_DEF_COLVAL , InstancePtr -> RowVal ) ; break ; case 0xa : XTft_SetPos ( InstancePtr , XTFT_DEF_COLVAL , InstancePtr -> RowVal + XTFT_CHAR_HEIGHT ) ; break ; default : XTft_SetPosChar ( InstancePtr , InstancePtr -> ColVal , InstancePtr -> RowVal ) ; XTft_WriteChar ( InstancePtr , CharValue , InstancePtr -> ColVal , InstancePtr -> RowVal , InstancePtr -> FgColor , InstancePtr -> BgColor ) ; InstancePtr -> ColVal += XTFT_CHAR_WIDTH ; break ; } }
This function performs one of the following three operations based on the
CharValue passed :
 Move the position to the next line at the same position.
This function performs one of the following three operations based on the CharValue passed : Move the position to the next line at the same position .
/*
	 * Assert validates the input arguments.
	 */ /*
	 * First two cases handle the special input values
	 * and default case performs a character write operation
	 * and it updates the column position in the instance structure.
	 */ /*
			 * Action to be taken for carriage return.
			 */ /*
			 * Action to be taken for line feed.
			 */ /*
			 * Set the position and write the character and
			 * update the column position by width of
			 * character.
			 */