
Added initial support Xilinx Embedded Software. Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
1021 lines
49 KiB
HTML
Executable file
1021 lines
49 KiB
HTML
Executable file
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
|
<title>
|
|
xtft.c File Reference
|
|
</title>
|
|
<link href="$DriverApiDocsCssPath" rel="stylesheet" type="text/css">
|
|
</head>
|
|
<h3 class="PageHeader">Xilinx Processor IP Library</h3>
|
|
<hl>Software Drivers</hl>
|
|
<hr class="whs1">
|
|
<!-- Generated by Doxygen 1.4.5 -->
|
|
<div class="tabs">
|
|
<ul>
|
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
|
<li><a href="annotated.html"><span>Classes</span></a></li>
|
|
<li id="current"><a href="files.html"><span>Files</span></a></li>
|
|
</ul></div>
|
|
<div class="tabs">
|
|
<ul>
|
|
<li><a href="files.html"><span>File List</span></a></li>
|
|
<li><a href="globals.html"><span>File Members</span></a></li>
|
|
</ul></div>
|
|
<h1>xtft.c File Reference</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
|
|
This file defines all the functions for the <a class="el" href="struct_x_tft.html">XTft</a> driver. See the xtft.h header file for more details on this driver.<p>
|
|
<pre>
|
|
MODIFICATION HISTORY:</pre><p>
|
|
<pre> Ver Who Date Changes
|
|
----- ---- -------- -----------------------------------------------
|
|
1.00a sg 03/24/08 First release
|
|
2.00a ktn 07/06/09 Added <a class="el" href="xtft_8c.html#cb4d26cfdd3917fc7fb5b64bd016555b">XTft_IntrEnable()</a>, <a class="el" href="xtft_8c.html#599a885eb110796c9b7e03103a4458f2">XTft_IntrDisable()</a>and,
|
|
<a class="el" href="xtft_8c.html#efc9f0b53c40bdd4b0fb639f45af6654">XTft_GetVsyncStatus()</a> functions to access newly added
|
|
Interrupt Enable and Status Register.
|
|
3.00a ktn 10/22/09 Updated driver to use the HAL APIs/macros.
|
|
Removed the macros XTft_mSetPixel and XTft_mGetPixel.
|
|
3.00a bss 01/16/12 Updated driver to remove warnings from asserts.
|
|
3.01a sg 05/30/12 Corrected the brace error introduced in
|
|
XTft_GetPixel while changing it from macro to
|
|
function for CR 647750.
|
|
3.02a bss 11/30/12 CR 690338 - Corrected the brace error introduced in
|
|
XTft_GetPixel for CR 647750.
|
|
4.00a bss 01/25/13 Added support for AXI TFT controller,
|
|
XTft_WriteReg and XTft_ReadReg functions are updated
|
|
Removed all functionality associated with DCR access
|
|
</pre>
|
|
<p>
|
|
<code>#include "xtft.h"</code><br>
|
|
<code>#include "<a class="el" href="xtft__charcode_8h.html">xtft_charcode.h</a>"</code><br>
|
|
<table border="0" cellpadding="0" cellspacing="0">
|
|
<tr><td></td></tr>
|
|
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="xtft_8c.html#efe958156fa3d1bcb0712d632ec0cdd4">XTft_CfgInitialize</a> (<a class="el" href="struct_x_tft.html">XTft</a> *InstancePtr, <a class="el" href="struct_x_tft___config.html">XTft_Config</a> *ConfigPtr, u32 EffectiveAddr)</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="xtft_8c.html#69a5e4c50e9490a3880a881267c902bc">XTft_SetPos</a> (<a class="el" href="struct_x_tft.html">XTft</a> *InstancePtr, u32 ColVal, u32 RowVal)</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="xtft_8c.html#eeb7d34e8d4675db70ed37e2808934e9">XTft_SetPosChar</a> (<a class="el" href="struct_x_tft.html">XTft</a> *InstancePtr, u32 ColVal, u32 RowVal)</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="xtft_8c.html#9a0a6e929a0513b9a82527f8f75e2e61">XTft_SetColor</a> (<a class="el" href="struct_x_tft.html">XTft</a> *InstancePtr, u32 FgColor, u32 BgColor)</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="xtft_8c.html#0fda7478301ee44df44e1f85401b7ccf">XTft_SetPixel</a> (<a class="el" href="struct_x_tft.html">XTft</a> *InstancePtr, u32 ColVal, u32 RowVal, u32 PixelVal)</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="xtft_8c.html#2fa1f0cd351c7015208fc808b888e2da">XTft_GetPixel</a> (<a class="el" href="struct_x_tft.html">XTft</a> *InstancePtr, u32 ColVal, u32 RowVal, u32 *PixelVal)</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="xtft_8c.html#36df8b62f44dc32729bf2964cc85302a">XTft_Write</a> (<a class="el" href="struct_x_tft.html">XTft</a> *InstancePtr, u8 CharValue)</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="xtft_8c.html#666ce411a6a0ee51310d5b30039071b2">XTft_Scroll</a> (<a class="el" href="struct_x_tft.html">XTft</a> *InstancePtr)</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="xtft_8c.html#e3db647fec454c325b4a8b87921f97a2">XTft_ClearScreen</a> (<a class="el" href="struct_x_tft.html">XTft</a> *InstancePtr)</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="xtft_8c.html#f9126268049dd4546878e1192632400a">XTft_FillScreen</a> (<a class="el" href="struct_x_tft.html">XTft</a> *InstancePtr, u32 ColStartVal, u32 RowStartVal, u32 ColEndVal, u32 RowEndVal, u32 PixelVal)</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="xtft_8c.html#6191ad8edbe24497c2bf8952d5117cbf">XTft_EnableDisplay</a> (<a class="el" href="struct_x_tft.html">XTft</a> *InstancePtr)</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="xtft_8c.html#8ab5c69e340879fcb4abdf26e3a0a64a">XTft_DisableDisplay</a> (<a class="el" href="struct_x_tft.html">XTft</a> *InstancePtr)</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="xtft_8c.html#c6f3c8cf1b95eca312b384b54076e006">XTft_ScanReverse</a> (<a class="el" href="struct_x_tft.html">XTft</a> *InstancePtr)</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="xtft_8c.html#4243fe10aa8be3c02614e2848733608f">XTft_ScanNormal</a> (<a class="el" href="struct_x_tft.html">XTft</a> *InstancePtr)</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="xtft_8c.html#a09d87094e5ebe0ed5b8eb22b7a071a1">XTft_SetFrameBaseAddr</a> (<a class="el" href="struct_x_tft.html">XTft</a> *InstancePtr, u32 NewFrameBaseAddr)</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="xtft_8c.html#8d2d645653338c94892497b0c9ecf14f">XTft_WriteReg</a> (<a class="el" href="struct_x_tft.html">XTft</a> *InstancePtr, u32 RegOffset, u32 Data)</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">u32 </td><td class="memItemRight" valign="bottom"><a class="el" href="xtft_8c.html#cd1dde70e13273427959110b3745b741">XTft_ReadReg</a> (<a class="el" href="struct_x_tft.html">XTft</a> *InstancePtr, u32 RegOffset)</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="xtft_8c.html#cb4d26cfdd3917fc7fb5b64bd016555b">XTft_IntrEnable</a> (<a class="el" href="struct_x_tft.html">XTft</a> *InstancePtr)</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="xtft_8c.html#599a885eb110796c9b7e03103a4458f2">XTft_IntrDisable</a> (<a class="el" href="struct_x_tft.html">XTft</a> *InstancePtr)</td></tr>
|
|
|
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="xtft_8c.html#efc9f0b53c40bdd4b0fb639f45af6654">XTft_GetVsyncStatus</a> (<a class="el" href="struct_x_tft.html">XTft</a> *InstancePtr)</td></tr>
|
|
|
|
</table>
|
|
<hr><h2>Function Documentation</h2>
|
|
<a class="anchor" name="efe958156fa3d1bcb0712d632ec0cdd4"></a><!-- doxytag: member="xtft.c::XTft_CfgInitialize" ref="efe958156fa3d1bcb0712d632ec0cdd4" args="(XTft *InstancePtr, XTft_Config *ConfigPtr, u32 EffectiveAddr)" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">int XTft_CfgInitialize </td>
|
|
<td class="md" valign="top">( </td>
|
|
<td class="md" nowrap valign="top"><a class="el" href="struct_x_tft.html">XTft</a> * </td>
|
|
<td class="mdname" nowrap> <em>InstancePtr</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap><a class="el" href="struct_x_tft___config.html">XTft_Config</a> * </td>
|
|
<td class="mdname" nowrap> <em>ConfigPtr</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap>u32 </td>
|
|
<td class="mdname" nowrap> <em>EffectiveAddr</em></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md"></td>
|
|
<td class="md">) </td>
|
|
<td class="md" colspan="2"></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
This function initializes a TFT Driver Instance.<p>
|
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em> </td><td>is a pointer to the <a class="el" href="struct_x_tft.html">XTft</a> instance. </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>ConfigPtr</em> </td><td>is a pointer to a <a class="el" href="struct_x_tft___config.html">XTft_Config</a> configuration structure.This structure will contain the requested configuration for the device. Typically, this is a local structure and the content of which will be copied into the configuration structure within <a class="el" href="struct_x_tft.html">XTft</a>. </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>EffectiveAddr</em> </td><td>is the device base address in the virtual memory address space. If the address translation is not used then the physical address is passed. Unexpected errors may occur if the address mapping is changed after this function is invoked.</td></tr>
|
|
</table>
|
|
</dl>
|
|
<dl compact><dt><b>Returns:</b></dt><dd><ul>
|
|
<li>XST_SUCCESS if successful.</li><li>XST_FAILURE if unsuccessful.</li></ul>
|
|
</dd></dl>
|
|
<dl compact><dt><b>Note:</b></dt><dd>None. </dd></dl>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<a class="anchor" name="e3db647fec454c325b4a8b87921f97a2"></a><!-- doxytag: member="xtft.c::XTft_ClearScreen" ref="e3db647fec454c325b4a8b87921f97a2" args="(XTft *InstancePtr)" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">void XTft_ClearScreen </td>
|
|
<td class="md" valign="top">( </td>
|
|
<td class="md" nowrap valign="top"><a class="el" href="struct_x_tft.html">XTft</a> * </td>
|
|
<td class="mdname1" valign="top" nowrap> <em>InstancePtr</em> </td>
|
|
<td class="md" valign="top"> ) </td>
|
|
<td class="md" nowrap></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
This function re-initializes all the pixels to the default background color.<p>
|
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em> </td><td>is a pointer to the <a class="el" href="struct_x_tft.html">XTft</a> instance.</td></tr>
|
|
</table>
|
|
</dl>
|
|
<dl compact><dt><b>Returns:</b></dt><dd>None.</dd></dl>
|
|
<dl compact><dt><b>Note:</b></dt><dd>None. </dd></dl>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<a class="anchor" name="8ab5c69e340879fcb4abdf26e3a0a64a"></a><!-- doxytag: member="xtft.c::XTft_DisableDisplay" ref="8ab5c69e340879fcb4abdf26e3a0a64a" args="(XTft *InstancePtr)" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">void XTft_DisableDisplay </td>
|
|
<td class="md" valign="top">( </td>
|
|
<td class="md" nowrap valign="top"><a class="el" href="struct_x_tft.html">XTft</a> * </td>
|
|
<td class="mdname1" valign="top" nowrap> <em>InstancePtr</em> </td>
|
|
<td class="md" valign="top"> ) </td>
|
|
<td class="md" nowrap></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
This function disables the TFT display by clearing the Display Enable bit in the Control register.<p>
|
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em> </td><td>is a pointer to the <a class="el" href="struct_x_tft.html">XTft</a> instance.</td></tr>
|
|
</table>
|
|
</dl>
|
|
<dl compact><dt><b>Returns:</b></dt><dd>None.</dd></dl>
|
|
<dl compact><dt><b>Note:</b></dt><dd>None. </dd></dl>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<a class="anchor" name="6191ad8edbe24497c2bf8952d5117cbf"></a><!-- doxytag: member="xtft.c::XTft_EnableDisplay" ref="6191ad8edbe24497c2bf8952d5117cbf" args="(XTft *InstancePtr)" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">void XTft_EnableDisplay </td>
|
|
<td class="md" valign="top">( </td>
|
|
<td class="md" nowrap valign="top"><a class="el" href="struct_x_tft.html">XTft</a> * </td>
|
|
<td class="mdname1" valign="top" nowrap> <em>InstancePtr</em> </td>
|
|
<td class="md" valign="top"> ) </td>
|
|
<td class="md" nowrap></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
This function enables the TFT display by setting the Display Enable bit in the Control register.<p>
|
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em> </td><td>is a pointer to the <a class="el" href="struct_x_tft.html">XTft</a> instance.</td></tr>
|
|
</table>
|
|
</dl>
|
|
<dl compact><dt><b>Returns:</b></dt><dd>None.</dd></dl>
|
|
<dl compact><dt><b>Note:</b></dt><dd>None. </dd></dl>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<a class="anchor" name="f9126268049dd4546878e1192632400a"></a><!-- doxytag: member="xtft.c::XTft_FillScreen" ref="f9126268049dd4546878e1192632400a" args="(XTft *InstancePtr, u32 ColStartVal, u32 RowStartVal, u32 ColEndVal, u32 RowEndVal, u32 PixelVal)" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">void XTft_FillScreen </td>
|
|
<td class="md" valign="top">( </td>
|
|
<td class="md" nowrap valign="top"><a class="el" href="struct_x_tft.html">XTft</a> * </td>
|
|
<td class="mdname" nowrap> <em>InstancePtr</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap>u32 </td>
|
|
<td class="mdname" nowrap> <em>ColStartVal</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap>u32 </td>
|
|
<td class="mdname" nowrap> <em>RowStartVal</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap>u32 </td>
|
|
<td class="mdname" nowrap> <em>ColEndVal</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap>u32 </td>
|
|
<td class="mdname" nowrap> <em>RowEndVal</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap>u32 </td>
|
|
<td class="mdname" nowrap> <em>PixelVal</em></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md"></td>
|
|
<td class="md">) </td>
|
|
<td class="md" colspan="2"></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
This function fills the screen with the range defined by the start and end values of column and row with the color passed as argument.<p>
|
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em> </td><td>is a pointer to the <a class="el" href="struct_x_tft.html">XTft</a> instance. </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>ColStartVal</em> </td><td>is the value of the starting column. The valid values are 0 to (XTFT_DISPLAY_WIDTH - 1). </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>RowStartVal</em> </td><td>is the value of the starting row. The valid values are 0 to (XTFT_DISPLAY_HEIGHT - 1). </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>ColEndVal</em> </td><td>is the value of the ending column. The valid values are 0 to (XTFT_DISPLAY_WIDTH - 1). </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>RowEndVal</em> </td><td>is the value of the ending row. The valid values are 0 to (XTFT_DISPLAY_HEIGHT - 1). </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>PixelVal</em> </td><td>represents the color with which it will be filled on screen.</td></tr>
|
|
</table>
|
|
</dl>
|
|
<dl compact><dt><b>Returns:</b></dt><dd>None.</dd></dl>
|
|
<dl compact><dt><b>Note:</b></dt><dd>It must be taken care to pass values such that column start position should not exceed column end position, same is the case with row position. </dd></dl>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<a class="anchor" name="2fa1f0cd351c7015208fc808b888e2da"></a><!-- doxytag: member="xtft.c::XTft_GetPixel" ref="2fa1f0cd351c7015208fc808b888e2da" args="(XTft *InstancePtr, u32 ColVal, u32 RowVal, u32 *PixelVal)" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">void XTft_GetPixel </td>
|
|
<td class="md" valign="top">( </td>
|
|
<td class="md" nowrap valign="top"><a class="el" href="struct_x_tft.html">XTft</a> * </td>
|
|
<td class="mdname" nowrap> <em>InstancePtr</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap>u32 </td>
|
|
<td class="mdname" nowrap> <em>ColVal</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap>u32 </td>
|
|
<td class="mdname" nowrap> <em>RowVal</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap>u32 * </td>
|
|
<td class="mdname" nowrap> <em>PixelVal</em></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md"></td>
|
|
<td class="md">) </td>
|
|
<td class="md" colspan="2"></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
This function gets the color of the pixel at the given column, row position.<p>
|
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em> </td><td>is a pointer to the <a class="el" href="struct_x_tft.html">XTft</a> instance. </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>ColVal</em> </td><td>represents the column on the screen. The valid values are 0 to (XTFT_DISPLAY_WIDTH - 1). </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>RowVal</em> </td><td>represents the row on the screen. The valid values are 0 to (XTFT_DISPLAY_HEIGHT - 1). </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>PixelVal</em> </td><td>stores the color value on the screen pointed by given Column and Row position.</td></tr>
|
|
</table>
|
|
</dl>
|
|
<dl compact><dt><b>Returns:</b></dt><dd>None.</dd></dl>
|
|
<dl compact><dt><b>Note:</b></dt><dd>This API is independent of the interface the TFT Controller is connected to. The data is read from the Video Memory. </dd></dl>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<a class="anchor" name="efc9f0b53c40bdd4b0fb639f45af6654"></a><!-- doxytag: member="xtft.c::XTft_GetVsyncStatus" ref="efc9f0b53c40bdd4b0fb639f45af6654" args="(XTft *InstancePtr)" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">int XTft_GetVsyncStatus </td>
|
|
<td class="md" valign="top">( </td>
|
|
<td class="md" nowrap valign="top"><a class="el" href="struct_x_tft.html">XTft</a> * </td>
|
|
<td class="mdname1" valign="top" nowrap> <em>InstancePtr</em> </td>
|
|
<td class="md" valign="top"> ) </td>
|
|
<td class="md" nowrap></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
This function gets the Vsync(Video address latch) status from the Interrupt Enable and Status Register.<p>
|
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em> </td><td>is a pointer to the <a class="el" href="struct_x_tft.html">XTft</a> instance.</td></tr>
|
|
</table>
|
|
</dl>
|
|
<dl compact><dt><b>Returns:</b></dt><dd><ul>
|
|
<li>TRUE if Vsync pulse has occurred after displaying the current frame.</li><li>FALSE if the TFT core has not completed displaying the current frame.</li></ul>
|
|
</dd></dl>
|
|
<dl compact><dt><b>Note:</b></dt><dd>Vsync(Video address latch) Status bit will be cleared by the HW after it loads the address from the Address Register and starts displaying the Frame. </dd></dl>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<a class="anchor" name="599a885eb110796c9b7e03103a4458f2"></a><!-- doxytag: member="xtft.c::XTft_IntrDisable" ref="599a885eb110796c9b7e03103a4458f2" args="(XTft *InstancePtr)" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">void XTft_IntrDisable </td>
|
|
<td class="md" valign="top">( </td>
|
|
<td class="md" nowrap valign="top"><a class="el" href="struct_x_tft.html">XTft</a> * </td>
|
|
<td class="mdname1" valign="top" nowrap> <em>InstancePtr</em> </td>
|
|
<td class="md" valign="top"> ) </td>
|
|
<td class="md" nowrap></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
This function disables the Vsync Interrupt in the Interrupt Enable and Status Register.<p>
|
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em> </td><td>is a pointer to the <a class="el" href="struct_x_tft.html">XTft</a> instance.</td></tr>
|
|
</table>
|
|
</dl>
|
|
<dl compact><dt><b>Returns:</b></dt><dd>None.</dd></dl>
|
|
<dl compact><dt><b>Note:</b></dt><dd>None. </dd></dl>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<a class="anchor" name="cb4d26cfdd3917fc7fb5b64bd016555b"></a><!-- doxytag: member="xtft.c::XTft_IntrEnable" ref="cb4d26cfdd3917fc7fb5b64bd016555b" args="(XTft *InstancePtr)" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">void XTft_IntrEnable </td>
|
|
<td class="md" valign="top">( </td>
|
|
<td class="md" nowrap valign="top"><a class="el" href="struct_x_tft.html">XTft</a> * </td>
|
|
<td class="mdname1" valign="top" nowrap> <em>InstancePtr</em> </td>
|
|
<td class="md" valign="top"> ) </td>
|
|
<td class="md" nowrap></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
This function enables the Vsync Interrupt in the Interrupt Enable and Status Register.<p>
|
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em> </td><td>is a pointer to the <a class="el" href="struct_x_tft.html">XTft</a> instance.</td></tr>
|
|
</table>
|
|
</dl>
|
|
<dl compact><dt><b>Returns:</b></dt><dd>None.</dd></dl>
|
|
<dl compact><dt><b>Note:</b></dt><dd>None. </dd></dl>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<a class="anchor" name="cd1dde70e13273427959110b3745b741"></a><!-- doxytag: member="xtft.c::XTft_ReadReg" ref="cd1dde70e13273427959110b3745b741" args="(XTft *InstancePtr, u32 RegOffset)" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">u32 XTft_ReadReg </td>
|
|
<td class="md" valign="top">( </td>
|
|
<td class="md" nowrap valign="top"><a class="el" href="struct_x_tft.html">XTft</a> * </td>
|
|
<td class="mdname" nowrap> <em>InstancePtr</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap>u32 </td>
|
|
<td class="mdname" nowrap> <em>RegOffset</em></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md"></td>
|
|
<td class="md">) </td>
|
|
<td class="md" colspan="2"></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
Read a value from a TFT register. A 32 bit read is performed.<p>
|
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em> </td><td>is a pointer to the <a class="el" href="struct_x_tft.html">XTft</a> instance. </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>RegOffset</em> </td><td>is the register offset from the base to read from.</td></tr>
|
|
</table>
|
|
</dl>
|
|
<dl compact><dt><b>Returns:</b></dt><dd>Data read from the register.</dd></dl>
|
|
<dl compact><dt><b>Note:</b></dt><dd>None. </dd></dl>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<a class="anchor" name="4243fe10aa8be3c02614e2848733608f"></a><!-- doxytag: member="xtft.c::XTft_ScanNormal" ref="4243fe10aa8be3c02614e2848733608f" args="(XTft *InstancePtr)" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">void XTft_ScanNormal </td>
|
|
<td class="md" valign="top">( </td>
|
|
<td class="md" nowrap valign="top"><a class="el" href="struct_x_tft.html">XTft</a> * </td>
|
|
<td class="mdname1" valign="top" nowrap> <em>InstancePtr</em> </td>
|
|
<td class="md" valign="top"> ) </td>
|
|
<td class="md" nowrap></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
This function enables normal scan by clearing the Display Scan Control(DPS) bit in the Control register.<p>
|
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em> </td><td>is a pointer to the <a class="el" href="struct_x_tft.html">XTft</a> instance.</td></tr>
|
|
</table>
|
|
</dl>
|
|
<dl compact><dt><b>Returns:</b></dt><dd>None.</dd></dl>
|
|
<dl compact><dt><b>Note:</b></dt><dd>None. </dd></dl>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<a class="anchor" name="c6f3c8cf1b95eca312b384b54076e006"></a><!-- doxytag: member="xtft.c::XTft_ScanReverse" ref="c6f3c8cf1b95eca312b384b54076e006" args="(XTft *InstancePtr)" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">void XTft_ScanReverse </td>
|
|
<td class="md" valign="top">( </td>
|
|
<td class="md" nowrap valign="top"><a class="el" href="struct_x_tft.html">XTft</a> * </td>
|
|
<td class="mdname1" valign="top" nowrap> <em>InstancePtr</em> </td>
|
|
<td class="md" valign="top"> ) </td>
|
|
<td class="md" nowrap></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
This function enables reverse scan by setting the Display Scan Control(DPS) bit in the Control register.<p>
|
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em> </td><td>is a pointer to the <a class="el" href="struct_x_tft.html">XTft</a> instance.</td></tr>
|
|
</table>
|
|
</dl>
|
|
<dl compact><dt><b>Returns:</b></dt><dd>None.</dd></dl>
|
|
<dl compact><dt><b>Note:</b></dt><dd>By default the scan direction is reverse, the image we see in reverse scan mode is the horizontal and vertical mirror image of the image in normal scan mode. </dd></dl>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<a class="anchor" name="666ce411a6a0ee51310d5b30039071b2"></a><!-- doxytag: member="xtft.c::XTft_Scroll" ref="666ce411a6a0ee51310d5b30039071b2" args="(XTft *InstancePtr)" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">void XTft_Scroll </td>
|
|
<td class="md" valign="top">( </td>
|
|
<td class="md" nowrap valign="top"><a class="el" href="struct_x_tft.html">XTft</a> * </td>
|
|
<td class="mdname1" valign="top" nowrap> <em>InstancePtr</em> </td>
|
|
<td class="md" valign="top"> ) </td>
|
|
<td class="md" nowrap></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
This function inserts a new blank line at the bottom of the screen, it deletes the first line and moves the remaining lines up by one line.<p>
|
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em> </td><td>is a pointer to the <a class="el" href="struct_x_tft.html">XTft</a> instance.</td></tr>
|
|
</table>
|
|
</dl>
|
|
<dl compact><dt><b>Returns:</b></dt><dd>None.</dd></dl>
|
|
<dl compact><dt><b>Note:</b></dt><dd>None. </dd></dl>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<a class="anchor" name="9a0a6e929a0513b9a82527f8f75e2e61"></a><!-- doxytag: member="xtft.c::XTft_SetColor" ref="9a0a6e929a0513b9a82527f8f75e2e61" args="(XTft *InstancePtr, u32 FgColor, u32 BgColor)" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">void XTft_SetColor </td>
|
|
<td class="md" valign="top">( </td>
|
|
<td class="md" nowrap valign="top"><a class="el" href="struct_x_tft.html">XTft</a> * </td>
|
|
<td class="mdname" nowrap> <em>InstancePtr</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap>u32 </td>
|
|
<td class="mdname" nowrap> <em>FgColor</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap>u32 </td>
|
|
<td class="mdname" nowrap> <em>BgColor</em></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md"></td>
|
|
<td class="md">) </td>
|
|
<td class="md" colspan="2"></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
This function changes the color values in the instance structure of driver.<p>
|
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em> </td><td>is a pointer to the <a class="el" href="struct_x_tft.html">XTft</a> instance. </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>FgColor</em> </td><td>is the color with which member FgColor of Instance structure is updated. </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>BgColor</em> </td><td>is the color with which member BgColor of Instance structure is updated.</td></tr>
|
|
</table>
|
|
</dl>
|
|
<dl compact><dt><b>Returns:</b></dt><dd>None.</dd></dl>
|
|
<dl compact><dt><b>Note:</b></dt><dd>Color Values must be 32bit. They can range from 0x0 to 0xFFFFFFFF, out of these only 18 bits are valid data. These 18 bits contain the Red, Green, Blue color values with 6 bits each and bit positions as Red[8-13], Green[16-21], Blue[24-29]. </dd></dl>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<a class="anchor" name="a09d87094e5ebe0ed5b8eb22b7a071a1"></a><!-- doxytag: member="xtft.c::XTft_SetFrameBaseAddr" ref="a09d87094e5ebe0ed5b8eb22b7a071a1" args="(XTft *InstancePtr, u32 NewFrameBaseAddr)" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">void XTft_SetFrameBaseAddr </td>
|
|
<td class="md" valign="top">( </td>
|
|
<td class="md" nowrap valign="top"><a class="el" href="struct_x_tft.html">XTft</a> * </td>
|
|
<td class="mdname" nowrap> <em>InstancePtr</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap>u32 </td>
|
|
<td class="mdname" nowrap> <em>NewFrameBaseAddr</em></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md"></td>
|
|
<td class="md">) </td>
|
|
<td class="md" colspan="2"></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
This function changes the Video Memory Base address stored in the Address Register.<p>
|
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em> </td><td>is a pointer to the <a class="el" href="struct_x_tft.html">XTft</a> instance. </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>NewFrameBaseAddr</em> </td><td>is the new memory address value to be written to the Address register.</td></tr>
|
|
</table>
|
|
</dl>
|
|
<dl compact><dt><b>Returns:</b></dt><dd>None.</dd></dl>
|
|
<dl compact><dt><b>Note:</b></dt><dd>The new memory address must be in the address range of external memory and it must be taken care that 2MB memory is available from this new address so that frame data to 640*480 screen can be written. </dd></dl>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<a class="anchor" name="0fda7478301ee44df44e1f85401b7ccf"></a><!-- doxytag: member="xtft.c::XTft_SetPixel" ref="0fda7478301ee44df44e1f85401b7ccf" args="(XTft *InstancePtr, u32 ColVal, u32 RowVal, u32 PixelVal)" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">void XTft_SetPixel </td>
|
|
<td class="md" valign="top">( </td>
|
|
<td class="md" nowrap valign="top"><a class="el" href="struct_x_tft.html">XTft</a> * </td>
|
|
<td class="mdname" nowrap> <em>InstancePtr</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap>u32 </td>
|
|
<td class="mdname" nowrap> <em>ColVal</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap>u32 </td>
|
|
<td class="mdname" nowrap> <em>RowVal</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap>u32 </td>
|
|
<td class="mdname" nowrap> <em>PixelVal</em></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md"></td>
|
|
<td class="md">) </td>
|
|
<td class="md" colspan="2"></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
This function sets the pixel with the given color at the given column, row position.<p>
|
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em> </td><td>is a pointer to the <a class="el" href="struct_x_tft.html">XTft</a> instance. </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>ColVal</em> </td><td>represents the column on the screen. The valid values are 0 to (XTFT_DISPLAY_WIDTH - 1). </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>RowVal</em> </td><td>represents the row on the screen. The valid values are 0 to (XTFT_DISPLAY_HEIGHT - 1). </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>PixelVal</em> </td><td>represents the color with which it will be filled on screen.</td></tr>
|
|
</table>
|
|
</dl>
|
|
<dl compact><dt><b>Returns:</b></dt><dd>None.</dd></dl>
|
|
<dl compact><dt><b>Note:</b></dt><dd>This API is independent of the interface the TFT Controller is connected to. The data is written to the Video Memory. </dd></dl>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<a class="anchor" name="69a5e4c50e9490a3880a881267c902bc"></a><!-- doxytag: member="xtft.c::XTft_SetPos" ref="69a5e4c50e9490a3880a881267c902bc" args="(XTft *InstancePtr, u32 ColVal, u32 RowVal)" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">void XTft_SetPos </td>
|
|
<td class="md" valign="top">( </td>
|
|
<td class="md" nowrap valign="top"><a class="el" href="struct_x_tft.html">XTft</a> * </td>
|
|
<td class="mdname" nowrap> <em>InstancePtr</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap>u32 </td>
|
|
<td class="mdname" nowrap> <em>ColVal</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap>u32 </td>
|
|
<td class="mdname" nowrap> <em>RowVal</em></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md"></td>
|
|
<td class="md">) </td>
|
|
<td class="md" colspan="2"></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
This function updates the column, row position in the Instance structure of driver.<p>
|
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em> </td><td>is a pointer to the <a class="el" href="struct_x_tft.html">XTft</a> instance. </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>ColVal</em> </td><td>is the column number to which ColVal member of Instance structure is updated. The valid values are 0 to (XTFT_DISPLAY_WIDTH - 1). </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>RowVal</em> </td><td>is the row number to which RowVal member of Instance structure is updated. The valid values are 0 to (XTFT_DISPLAY_HEIGHT - 1).</td></tr>
|
|
</table>
|
|
</dl>
|
|
<dl compact><dt><b>Returns:</b></dt><dd>None.</dd></dl>
|
|
<dl compact><dt><b>Note:</b></dt><dd>None. </dd></dl>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<a class="anchor" name="eeb7d34e8d4675db70ed37e2808934e9"></a><!-- doxytag: member="xtft.c::XTft_SetPosChar" ref="eeb7d34e8d4675db70ed37e2808934e9" args="(XTft *InstancePtr, u32 ColVal, u32 RowVal)" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">void XTft_SetPosChar </td>
|
|
<td class="md" valign="top">( </td>
|
|
<td class="md" nowrap valign="top"><a class="el" href="struct_x_tft.html">XTft</a> * </td>
|
|
<td class="mdname" nowrap> <em>InstancePtr</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap>u32 </td>
|
|
<td class="mdname" nowrap> <em>ColVal</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap>u32 </td>
|
|
<td class="mdname" nowrap> <em>RowVal</em></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md"></td>
|
|
<td class="md">) </td>
|
|
<td class="md" colspan="2"></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
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.<p>
|
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em> </td><td>is a pointer to the <a class="el" href="struct_x_tft.html">XTft</a> instance. </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>ColVal</em> </td><td>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). </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>RowVal</em> </td><td>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).</td></tr>
|
|
</table>
|
|
</dl>
|
|
<dl compact><dt><b>Returns:</b></dt><dd>None.</dd></dl>
|
|
<dl compact><dt><b>Note:</b></dt><dd>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. </dd></dl>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<a class="anchor" name="36df8b62f44dc32729bf2964cc85302a"></a><!-- doxytag: member="xtft.c::XTft_Write" ref="36df8b62f44dc32729bf2964cc85302a" args="(XTft *InstancePtr, u8 CharValue)" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">void XTft_Write </td>
|
|
<td class="md" valign="top">( </td>
|
|
<td class="md" nowrap valign="top"><a class="el" href="struct_x_tft.html">XTft</a> * </td>
|
|
<td class="mdname" nowrap> <em>InstancePtr</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap>u8 </td>
|
|
<td class="mdname" nowrap> <em>CharValue</em></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md"></td>
|
|
<td class="md">) </td>
|
|
<td class="md" colspan="2"></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
This function performs one of the following three operations based on the CharValue passed :<ul>
|
|
<li>Move the position to the next line at the same position.</li><li>Move the position to the next line.</li><li>Write a particular character and update the column position by the width of the character.</li></ul>
|
|
<p>
|
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em> </td><td>is a pointer to the <a class="el" href="struct_x_tft.html">XTft</a> instance. </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>CharValue</em> </td><td>is the ASCII code value of the character to be written.</td></tr>
|
|
</table>
|
|
</dl>
|
|
<dl compact><dt><b>Returns:</b></dt><dd>None.</dd></dl>
|
|
<dl compact><dt><b>Note:</b></dt><dd>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. </dd></dl>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<a class="anchor" name="8d2d645653338c94892497b0c9ecf14f"></a><!-- doxytag: member="xtft.c::XTft_WriteReg" ref="8d2d645653338c94892497b0c9ecf14f" args="(XTft *InstancePtr, u32 RegOffset, u32 Data)" --><p>
|
|
<table class="mdTable" cellpadding="2" cellspacing="0">
|
|
<tr>
|
|
<td class="mdRow">
|
|
<table cellpadding="0" cellspacing="0" border="0">
|
|
<tr>
|
|
<td class="md" nowrap valign="top">void XTft_WriteReg </td>
|
|
<td class="md" valign="top">( </td>
|
|
<td class="md" nowrap valign="top"><a class="el" href="struct_x_tft.html">XTft</a> * </td>
|
|
<td class="mdname" nowrap> <em>InstancePtr</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap>u32 </td>
|
|
<td class="mdname" nowrap> <em>RegOffset</em>, </td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md" nowrap align="right"></td>
|
|
<td class="md"></td>
|
|
<td class="md" nowrap>u32 </td>
|
|
<td class="mdname" nowrap> <em>Data</em></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="md"></td>
|
|
<td class="md">) </td>
|
|
<td class="md" colspan="2"></td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<table cellspacing="5" cellpadding="0" border="0">
|
|
<tr>
|
|
<td>
|
|
|
|
</td>
|
|
<td>
|
|
|
|
<p>
|
|
Write a value to a TFT register. A 32 bit write is performed.<p>
|
|
<dl compact><dt><b>Parameters:</b></dt><dd>
|
|
<table border="0" cellspacing="2" cellpadding="0">
|
|
<tr><td valign="top"></td><td valign="top"><em>InstancePtr</em> </td><td>is a pointer to the <a class="el" href="struct_x_tft.html">XTft</a> instance. </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>RegOffset</em> </td><td>is the register offset from the base to write to. </td></tr>
|
|
<tr><td valign="top"></td><td valign="top"><em>Data</em> </td><td>is the data written to the register.</td></tr>
|
|
</table>
|
|
</dl>
|
|
<dl compact><dt><b>Returns:</b></dt><dd>None.</dd></dl>
|
|
<dl compact><dt><b>Note:</b></dt><dd>None. </dd></dl>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
Copyright @ 1995-2014 Xilinx, Inc. All rights reserved.
|