151 lines
9.5 KiB
HTML
151 lines
9.5 KiB
HTML
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||
|
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||
|
<meta name="generator" content="Doxygen 1.8.3"/>
|
||
|
<title>Max7456: Max7456WriteTable.cpp</title>
|
||
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||
|
<script type="text/javascript" src="jquery.js"></script>
|
||
|
<script type="text/javascript" src="dynsections.js"></script>
|
||
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||
|
<script type="text/javascript" src="search/search.js"></script>
|
||
|
<script type="text/javascript">
|
||
|
$(document).ready(function() { searchBox.OnSelectItem(0); });
|
||
|
</script>
|
||
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||
|
</head>
|
||
|
<body>
|
||
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||
|
<div id="titlearea">
|
||
|
<table cellspacing="0" cellpadding="0">
|
||
|
<tbody>
|
||
|
<tr style="height: 56px;">
|
||
|
<td id="projectlogo"><img alt="Logo" src="max7456.jpg"/></td>
|
||
|
<td style="padding-left: 0.5em;">
|
||
|
<div id="projectname">Max7456
|
||
|
</div>
|
||
|
<div id="projectbrief">Class representing a max7456</div>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
</div>
|
||
|
<!-- end header part -->
|
||
|
<!-- Generated by Doxygen 1.8.3 -->
|
||
|
<script type="text/javascript">
|
||
|
var searchBox = new SearchBox("searchBox", "search",false,'Search');
|
||
|
</script>
|
||
|
<div id="navrow1" class="tabs">
|
||
|
<ul class="tablist">
|
||
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
||
|
<li><a href="annotated.html"><span>Classes</span></a></li>
|
||
|
<li><a href="files.html"><span>Files</span></a></li>
|
||
|
<li><a href="examples.html"><span>Examples</span></a></li>
|
||
|
<li>
|
||
|
<div id="MSearchBox" class="MSearchBoxInactive">
|
||
|
<span class="left">
|
||
|
<img id="MSearchSelect" src="search/mag_sel.png"
|
||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||
|
alt=""/>
|
||
|
<input type="text" id="MSearchField" value="Search" accesskey="S"
|
||
|
onfocus="searchBox.OnSearchFieldFocus(true)"
|
||
|
onblur="searchBox.OnSearchFieldFocus(false)"
|
||
|
onkeyup="searchBox.OnSearchFieldChange(event)"/>
|
||
|
</span><span class="right">
|
||
|
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
|
||
|
</span>
|
||
|
</div>
|
||
|
</li>
|
||
|
</ul>
|
||
|
</div>
|
||
|
</div><!-- top -->
|
||
|
<!-- window showing the filter options -->
|
||
|
<div id="MSearchSelectWindow"
|
||
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
||
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
||
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||
|
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Pages</a></div>
|
||
|
|
||
|
<!-- iframe showing the search results (closed by default) -->
|
||
|
<div id="MSearchResultsWindow">
|
||
|
<iframe src="javascript:void(0)" frameborder="0"
|
||
|
name="MSearchResults" id="MSearchResults">
|
||
|
</iframe>
|
||
|
</div>
|
||
|
|
||
|
<div class="header">
|
||
|
<div class="headertitle">
|
||
|
<div class="title">Max7456WriteTable.cpp</div> </div>
|
||
|
</div><!--header-->
|
||
|
<div class="contents">
|
||
|
<div class="fragment"><div class="line"><span class="comment">// Do not remove the include below</span></div>
|
||
|
<div class="line"><span class="preprocessor">#include "Max7456WriteTable.h"</span></div>
|
||
|
<div class="line"></div>
|
||
|
<div class="line"></div>
|
||
|
<div class="line"><span class="keywordtype">void</span> setup()</div>
|
||
|
<div class="line">{</div>
|
||
|
<div class="line"></div>
|
||
|
<div class="line"> <span class="comment">//Sample code : Write a complete table of character in the character memory of the max7456.</span></div>
|
||
|
<div class="line"></div>
|
||
|
<div class="line"> <a name="a0"></a><a class="code" href="max7456_registers_8h.html#ad27a62f0d623b8270c1346ada8eb81a2" title="Represents a character as stored in max7456 character memory.">charact</a> currentChar; <span class="comment">//represents a character as stored in memory (byte[54])</span></div>
|
||
|
<div class="line"></div>
|
||
|
<div class="line"> Serial.begin(115200);</div>
|
||
|
<div class="line"> osd = <span class="keyword">new</span> <a name="_a1"></a><a class="code" href="class_max7456.html" title="Represents a max7456 device communicating through SPI port.">Max7456</a>(9); <span class="comment">//new Max7456 with CS on pin 9.</span></div>
|
||
|
<div class="line"></div>
|
||
|
<div class="line"> Serial.println(<span class="stringliteral">"INSERTING CHARACTERS TABLE IN MAX7456"</span>);</div>
|
||
|
<div class="line"> Serial.println(<span class="stringliteral">"ARE YOU SURE ? (y/n)"</span>);</div>
|
||
|
<div class="line"> <span class="keywordtype">bool</span> goodChar = <span class="keyword">false</span>;</div>
|
||
|
<div class="line"></div>
|
||
|
<div class="line"> osd->activateOSD(<span class="keyword">false</span>); <span class="comment">// Deactivate osd display.</span></div>
|
||
|
<div class="line"></div>
|
||
|
<div class="line"> <span class="comment">//Just some serial manipulations</span></div>
|
||
|
<div class="line"> <span class="keywordflow">while</span>(!goodChar)</div>
|
||
|
<div class="line"> {</div>
|
||
|
<div class="line"> <span class="keywordflow">while</span>(!Serial.available() );</div>
|
||
|
<div class="line"> <span class="keywordtype">char</span> found;</div>
|
||
|
<div class="line"> found = char(Serial.read());</div>
|
||
|
<div class="line"> goodChar = (found == <span class="charliteral">'y'</span> || found == <span class="charliteral">'Y'</span>);</div>
|
||
|
<div class="line"> <span class="keywordflow">if</span>(found == <span class="charliteral">'n'</span> || found == <span class="charliteral">'N'</span>)</div>
|
||
|
<div class="line"> {</div>
|
||
|
<div class="line"> Serial.println(<span class="stringliteral">"------ NOTHING DONE ------"</span>);</div>
|
||
|
<div class="line"> Serial.println(<span class="stringliteral">"please unplug your arduino"</span>);</div>
|
||
|
<div class="line"> <span class="keywordflow">while</span>(<span class="keyword">true</span>);</div>
|
||
|
<div class="line"> }</div>
|
||
|
<div class="line"> }</div>
|
||
|
<div class="line"></div>
|
||
|
<div class="line"> <span class="keywordtype">char</span> number[]=<span class="stringliteral">"000"</span>;</div>
|
||
|
<div class="line"></div>
|
||
|
<div class="line"> <span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 0 ; i <= 0xff;i++)</div>
|
||
|
<div class="line"> {</div>
|
||
|
<div class="line"> Serial.print(<span class="stringliteral">"inserting "</span>);</div>
|
||
|
<div class="line"> dtostrf(i,3,0,number);</div>
|
||
|
<div class="line"> Serial.print(number);</div>
|
||
|
<div class="line"> Serial.print(<span class="stringliteral">" / 255"</span>);</div>
|
||
|
<div class="line"> <a name="a2"></a><a class="code" href="class_max7456.html#ab3323c8b25b660cb3edd36797efd7bfc">Max7456::getCARACFromProgMem</a>(i,currentChar); <span class="comment">//Because the table is too big for ram memory</span></div>
|
||
|
<div class="line"></div>
|
||
|
<div class="line"> osd->sendCharacter(currentChar,i); <span class="comment">//We send currentChar at address i.</span></div>
|
||
|
<div class="line"></div>
|
||
|
<div class="line"> <span class="keywordflow">for</span>(<span class="keywordtype">int</span> j=0 ; j<19 ; j++) <span class="comment">//Rewind Serial.</span></div>
|
||
|
<div class="line"> Serial.print(<span class="keywordtype">char</span>(0x08));</div>
|
||
|
<div class="line"> }</div>
|
||
|
<div class="line"> Serial.println(<span class="stringliteral">"--------- DONE ! ---------"</span>);</div>
|
||
|
<div class="line"> Serial.println(<span class="stringliteral">"please unplug your arduino"</span>);</div>
|
||
|
<div class="line"></div>
|
||
|
<div class="line">}</div>
|
||
|
<div class="line"></div>
|
||
|
<div class="line"><span class="keywordtype">void</span> loop()</div>
|
||
|
<div class="line">{</div>
|
||
|
<div class="line"> <span class="comment">//Nothing done here</span></div>
|
||
|
<div class="line">}</div>
|
||
|
</div><!-- fragment --> </div><!-- contents -->
|
||
|
<!-- start footer part -->
|
||
|
<hr class="footer"/><address class="footer"><small>
|
||
|
Generated on Fri Dec 28 2012 12:27:18 for Max7456 by  <a href="http://www.doxygen.org/index.html">
|
||
|
<img class="footer" src="doxygen.png" alt="doxygen"/>
|
||
|
</a> 1.8.3
|
||
|
</small></address>
|
||
|
</body>
|
||
|
</html>
|