Added text functions in graphics mode

This commit is contained in:
Sebastian Schumb (softwerker 2009-05-21 13:55:55 +02:00
parent 964c5df481
commit 2262a33c4c
21 changed files with 370 additions and 88 deletions

View File

@ -14,7 +14,7 @@
</div>
<h1>button.h</h1><a href="button_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="preprocessor">#include &lt;avr/pgmspace.h&gt;</span>
<a name="l00002"></a>00002
<a name="l00003"></a><a class="code" href="button_8h.html#1ca6393a353d3dde5511786a4d7cc139">00003</a> <span class="keyword">const</span> uint8_t bitmap[] <a class="code" href="button_8h.html#1ca6393a353d3dde5511786a4d7cc139">PROGMEM</a> = {
<a name="l00003"></a><a class="code" href="button_8h.html#1ca6393a353d3dde5511786a4d7cc139">00003</a> <span class="keyword">const</span> uint8_t bitmap[] <a class="code" href="12x16__horizontal__LSB__1_8h.html#f0367e5a8f2e1931348909f7875e3236">PROGMEM</a> = {
<a name="l00004"></a>00004 0x00,0x00,0x00,0x00,
<a name="l00005"></a>00005 0x80,0xFF,0xFF,0x01,
<a name="l00006"></a>00006 0x60,0x00,0x00,0x06,
@ -49,7 +49,7 @@
<a name="l00035"></a>00035 0x00,0x00,0x00,0x00};
<a name="l00036"></a>00036
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sun May 17 18:34:49 2009 for glcd by&nbsp;
<hr size="1"><address style="text-align: right;"><small>Generated on Tue May 19 21:40:21 2009 for glcd by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address>
</body>

View File

@ -40,7 +40,7 @@
</div>
</div><p>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sun May 17 18:34:49 2009 for glcd by&nbsp;
<hr size="1"><address style="text-align: right;"><small>Generated on Tue May 19 21:40:21 2009 for glcd by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address>
</body>

View File

@ -21,13 +21,15 @@
</div>
<div class="contents">
<h1>File List</h1>Here is a list of all files with brief descriptions:<table>
<tr><td class="indexkey"><a class="el" href="12x16__horizontal__LSB__1_8h.html">12x16_horizontal_LSB_1.h</a> <a href="12x16__horizontal__LSB__1_8h-source.html">[code]</a></td><td class="indexvalue"></td></tr>
<tr><td class="indexkey"><a class="el" href="8x8__horizontal__LSB__1_8h.html">8x8_horizontal_LSB_1.h</a> <a href="8x8__horizontal__LSB__1_8h-source.html">[code]</a></td><td class="indexvalue"></td></tr>
<tr><td class="indexkey"><a class="el" href="button_8h.html">button.h</a> <a href="button_8h-source.html">[code]</a></td><td class="indexvalue"></td></tr>
<tr><td class="indexkey"><a class="el" href="main_8c.html">main.c</a></td><td class="indexvalue"></td></tr>
<tr><td class="indexkey">include/<a class="el" href="lc7981_8c.html">lc7981.c</a></td><td class="indexvalue"></td></tr>
<tr><td class="indexkey">include/<a class="el" href="lc7981_8h.html">lc7981.h</a> <a href="lc7981_8h-source.html">[code]</a></td><td class="indexvalue"></td></tr>
</table>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sun May 17 18:34:49 2009 for glcd by&nbsp;
<hr size="1"><address style="text-align: right;"><small>Generated on Tue May 19 21:40:21 2009 for glcd by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address>
</body>

View File

@ -78,9 +78,14 @@ Here is a list of all functions, variables, defines, enums, and typedefs with li
<li>lcd_plot_bitmap()
: <a class="el" href="lc7981_8c.html#f3b584ee8235c6ed4ebefc50f8a95915">lc7981.c</a>
, <a class="el" href="lc7981_8h.html#175d691feb304584c8c18e6456e07401">lc7981.h</a>
<li>lcd_plot_char()
: <a class="el" href="lc7981_8c.html#9bbbc52f3cb24a861d11b08e1c14bca2">lc7981.c</a>
, <a class="el" href="lc7981_8h.html#9bbbc52f3cb24a861d11b08e1c14bca2">lc7981.h</a>
<li>lcd_plot_pixel()
: <a class="el" href="lc7981_8h.html#735111507ed83172f58d5af2953e31c6">lc7981.h</a>
, <a class="el" href="lc7981_8c.html#735111507ed83172f58d5af2953e31c6">lc7981.c</a>
: <a class="el" href="lc7981_8c.html#735111507ed83172f58d5af2953e31c6">lc7981.c</a>
, <a class="el" href="lc7981_8h.html#735111507ed83172f58d5af2953e31c6">lc7981.h</a>
<li>lcd_plot_text()
: <a class="el" href="lc7981_8c.html#1e956901a8e75f3d7264d8e0e9ccaf60">lc7981.c</a>
<li>lcd_read_byte()
: <a class="el" href="lc7981_8c.html#6334333537ad1d0bd51cba1e80f32e74">lc7981.c</a>
, <a class="el" href="lc7981_8h.html#6334333537ad1d0bd51cba1e80f32e74">lc7981.h</a>
@ -97,8 +102,8 @@ Here is a list of all functions, variables, defines, enums, and typedefs with li
<li>lcd_rw_low
: <a class="el" href="lc7981_8h.html#7f5ebe0ca71b1298a7d3423850cc82b1">lc7981.h</a>
<li>lcd_strobe()
: <a class="el" href="lc7981_8c.html#b4f286d6a313df7a5f692e0b4a9509ad">lc7981.c</a>
, <a class="el" href="lc7981_8h.html#b4f286d6a313df7a5f692e0b4a9509ad">lc7981.h</a>
: <a class="el" href="lc7981_8h.html#b4f286d6a313df7a5f692e0b4a9509ad">lc7981.h</a>
, <a class="el" href="lc7981_8c.html#b4f286d6a313df7a5f692e0b4a9509ad">lc7981.c</a>
<li>LCD_TEXT
: <a class="el" href="lc7981_8h.html#90a69d37f5c80f3ded970acf2dacf4c0">lc7981.h</a>
<li>LCD_TEXT_COLUMNS
@ -122,10 +127,12 @@ Here is a list of all functions, variables, defines, enums, and typedefs with li
<li>PIXEL_ON
: <a class="el" href="lc7981_8h.html#eb2d212a26da4a5a4d3231b2773023e5">lc7981.h</a>
<li>PROGMEM
: <a class="el" href="button_8h.html#1ca6393a353d3dde5511786a4d7cc139">button.h</a>
: <a class="el" href="8x8__horizontal__LSB__1_8h.html#ba6ccc96f4d96e2e7f9062a7a72b4766">8x8_horizontal_LSB_1.h</a>
, <a class="el" href="12x16__horizontal__LSB__1_8h.html#f0367e5a8f2e1931348909f7875e3236">12x16_horizontal_LSB_1.h</a>
, <a class="el" href="button_8h.html#1ca6393a353d3dde5511786a4d7cc139">button.h</a>
</ul>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sun May 17 18:34:49 2009 for glcd by&nbsp;
<hr size="1"><address style="text-align: right;"><small>Generated on Tue May 19 21:40:21 2009 for glcd by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address>
</body>

View File

@ -77,7 +77,7 @@
: <a class="el" href="lc7981_8h.html#eb2d212a26da4a5a4d3231b2773023e5">lc7981.h</a>
</ul>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sun May 17 18:34:49 2009 for glcd by&nbsp;
<hr size="1"><address style="text-align: right;"><small>Generated on Tue May 19 21:40:21 2009 for glcd by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address>
</body>

View File

@ -43,18 +43,23 @@
<li>lcd_plot_bitmap()
: <a class="el" href="lc7981_8h.html#175d691feb304584c8c18e6456e07401">lc7981.h</a>
, <a class="el" href="lc7981_8c.html#f3b584ee8235c6ed4ebefc50f8a95915">lc7981.c</a>
<li>lcd_plot_char()
: <a class="el" href="lc7981_8c.html#9bbbc52f3cb24a861d11b08e1c14bca2">lc7981.c</a>
, <a class="el" href="lc7981_8h.html#9bbbc52f3cb24a861d11b08e1c14bca2">lc7981.h</a>
<li>lcd_plot_pixel()
: <a class="el" href="lc7981_8c.html#735111507ed83172f58d5af2953e31c6">lc7981.c</a>
, <a class="el" href="lc7981_8h.html#735111507ed83172f58d5af2953e31c6">lc7981.h</a>
<li>lcd_plot_text()
: <a class="el" href="lc7981_8c.html#1e956901a8e75f3d7264d8e0e9ccaf60">lc7981.c</a>
<li>lcd_read_byte()
: <a class="el" href="lc7981_8c.html#6334333537ad1d0bd51cba1e80f32e74">lc7981.c</a>
, <a class="el" href="lc7981_8h.html#6334333537ad1d0bd51cba1e80f32e74">lc7981.h</a>
: <a class="el" href="lc7981_8h.html#6334333537ad1d0bd51cba1e80f32e74">lc7981.h</a>
, <a class="el" href="lc7981_8c.html#6334333537ad1d0bd51cba1e80f32e74">lc7981.c</a>
<li>lcd_strobe()
: <a class="el" href="lc7981_8c.html#b4f286d6a313df7a5f692e0b4a9509ad">lc7981.c</a>
, <a class="el" href="lc7981_8h.html#b4f286d6a313df7a5f692e0b4a9509ad">lc7981.h</a>
<li>lcd_write_command()
: <a class="el" href="lc7981_8h.html#b69146a9179fc5b5deef3fc61cf0208c">lc7981.h</a>
, <a class="el" href="lc7981_8c.html#b69146a9179fc5b5deef3fc61cf0208c">lc7981.c</a>
: <a class="el" href="lc7981_8c.html#b69146a9179fc5b5deef3fc61cf0208c">lc7981.c</a>
, <a class="el" href="lc7981_8h.html#b69146a9179fc5b5deef3fc61cf0208c">lc7981.h</a>
<li>lcd_write_text()
: <a class="el" href="lc7981_8h.html#30251238a49999658455fdb0233757fb">lc7981.h</a>
, <a class="el" href="lc7981_8c.html#30251238a49999658455fdb0233757fb">lc7981.c</a>
@ -62,7 +67,7 @@
: <a class="el" href="main_8c.html#e66f6b31b5ad750f1fe042a706a4e3d4">main.c</a>
</ul>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sun May 17 18:34:49 2009 for glcd by&nbsp;
<hr size="1"><address style="text-align: right;"><small>Generated on Tue May 19 21:40:21 2009 for glcd by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address>
</body>

View File

@ -36,10 +36,12 @@
<li>lcd_mode
: <a class="el" href="lc7981_8c.html#a29c0577fe01129f48b5b21301d3ea49">lc7981.c</a>
<li>PROGMEM
: <a class="el" href="button_8h.html#1ca6393a353d3dde5511786a4d7cc139">button.h</a>
: <a class="el" href="12x16__horizontal__LSB__1_8h.html#f0367e5a8f2e1931348909f7875e3236">12x16_horizontal_LSB_1.h</a>
, <a class="el" href="button_8h.html#1ca6393a353d3dde5511786a4d7cc139">button.h</a>
, <a class="el" href="8x8__horizontal__LSB__1_8h.html#ba6ccc96f4d96e2e7f9062a7a72b4766">8x8_horizontal_LSB_1.h</a>
</ul>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sun May 17 18:34:49 2009 for glcd by&nbsp;
<hr size="1"><address style="text-align: right;"><small>Generated on Tue May 19 21:40:21 2009 for glcd by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address>
</body>

View File

@ -17,7 +17,7 @@
<h1>glcd Documentation</h1>
<p>
<h3 align="center">0.1beta </h3></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sun May 17 18:34:49 2009 for glcd by&nbsp;
<hr size="1"><address style="text-align: right;"><small>Generated on Tue May 19 21:40:21 2009 for glcd by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address>
</body>

View File

@ -44,6 +44,10 @@
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="lc7981_8c.html#f3b584ee8235c6ed4ebefc50f8a95915">lcd_plot_bitmap</a> (uint8_t x_off, uint8_t y_off, const uint8_t *bitmap, uint8_t w, uint8_t h)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This function will plot a bitmap with the upper left corner to the given coordinates. <a href="#f3b584ee8235c6ed4ebefc50f8a95915"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="lc7981_8c.html#9bbbc52f3cb24a861d11b08e1c14bca2">lcd_plot_char</a> (uint8_t x_off, uint8_t y_off, uint8_t c, uint8_t fw, uint8_t fh, const uint8_t *font)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="lc7981_8c.html#1e956901a8e75f3d7264d8e0e9ccaf60">lcd_plot_text</a> (uint8_t x_off, uint8_t y_off, const char *text, const uint8_t *font)</td></tr>
<tr><td colspan="2"><br><h2>Variables</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">uint8_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="lc7981_8c.html#a29c0577fe01129f48b5b21301d3ea49">lcd_mode</a></td></tr>
@ -177,7 +181,7 @@ lcd_init set the to default values.
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
<td></td><td></td><td width="100%"><code> [inline]</code></td>
</tr>
</table>
</div>
@ -205,6 +209,59 @@ This function will plot a bitmap with the upper left corner to the given coordin
This function is dedicated to Greta, one of the most important persons in my life so far.<br>
Even though I can't remember her actual name.<br>
</div>
</div><p>
<a class="anchor" name="9bbbc52f3cb24a861d11b08e1c14bca2"></a><!-- doxytag: member="lc7981.c::lcd_plot_char" ref="9bbbc52f3cb24a861d11b08e1c14bca2" args="(uint8_t x_off, uint8_t y_off, uint8_t c, uint8_t fw, uint8_t fh, const uint8_t *font)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void lcd_plot_char </td>
<td>(</td>
<td class="paramtype">uint8_t&nbsp;</td>
<td class="paramname"> <em>x_off</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&nbsp;</td>
<td class="paramname"> <em>y_off</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&nbsp;</td>
<td class="paramname"> <em>c</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&nbsp;</td>
<td class="paramname"> <em>fw</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&nbsp;</td>
<td class="paramname"> <em>fh</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const uint8_t *&nbsp;</td>
<td class="paramname"> <em>font</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
</div>
</div><p>
<a class="anchor" name="735111507ed83172f58d5af2953e31c6"></a><!-- doxytag: member="lc7981.c::lcd_plot_pixel" ref="735111507ed83172f58d5af2953e31c6" args="(uint8_t x, uint8_t y, uint8_t set)" -->
@ -249,6 +306,47 @@ set or unset a pixel at the specified location
</table>
</dl>
</div>
</div><p>
<a class="anchor" name="1e956901a8e75f3d7264d8e0e9ccaf60"></a><!-- doxytag: member="lc7981.c::lcd_plot_text" ref="1e956901a8e75f3d7264d8e0e9ccaf60" args="(uint8_t x_off, uint8_t y_off, const char *text, const uint8_t *font)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void lcd_plot_text </td>
<td>(</td>
<td class="paramtype">uint8_t&nbsp;</td>
<td class="paramname"> <em>x_off</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&nbsp;</td>
<td class="paramname"> <em>y_off</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const char *&nbsp;</td>
<td class="paramname"> <em>text</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const uint8_t *&nbsp;</td>
<td class="paramname"> <em>font</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
</div>
</div><p>
<a class="anchor" name="6334333537ad1d0bd51cba1e80f32e74"></a><!-- doxytag: member="lc7981.c::lcd_read_byte" ref="6334333537ad1d0bd51cba1e80f32e74" args="()" -->
@ -389,7 +487,7 @@ Currently used mode, can be text or graphic.
</div>
</div><p>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sun May 17 18:34:49 2009 for glcd by&nbsp;
<hr size="1"><address style="text-align: right;"><small>Generated on Tue May 19 21:40:21 2009 for glcd by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address>
</body>

View File

@ -33,64 +33,73 @@
<a name="l00019"></a>00019 <span class="comment"> * You should have received a copy of the GNU General Public License</span>
<a name="l00020"></a>00020 <span class="comment"> * along with Sebastians AVR Library. If not, see &lt;http://www.gnu.org/licenses/&gt;.</span>
<a name="l00021"></a>00021 <span class="comment"> *</span>
<a name="l00022"></a>00022 <span class="comment"> */</span>
<a name="l00023"></a>00023
<a name="l00024"></a>00024 <span class="preprocessor">#ifndef LC7981_H_</span>
<a name="l00025"></a><a class="code" href="lc7981_8h.html#e6ff861bd55f4dc46f25f5f6abfca15f">00025</a> <span class="preprocessor"></span><span class="preprocessor">#define LC7981_H_ LC7981_H_ </span>
<a name="l00026"></a>00026 <span class="preprocessor"></span>
<a name="l00027"></a>00027 <span class="preprocessor"></span><span class="preprocessor">#include &lt;avr/io.h&gt;</span>
<a name="l00028"></a>00028 <span class="preprocessor">#include &lt;util/delay.h&gt;</span>
<a name="l00029"></a>00029 <span class="preprocessor">#include &lt;avr/pgmspace.h&gt;</span>
<a name="l00022"></a>00022 <span class="comment"> *</span>
<a name="l00023"></a>00023 <span class="comment"> * 'Do the thing you want to do and let your spirits guide you through.</span>
<a name="l00024"></a>00024 <span class="comment"> * Live a life, worth being remembered.'</span>
<a name="l00025"></a>00025 <span class="comment"> * -- Remembered - Firewind --</span>
<a name="l00026"></a>00026 <span class="comment"> */</span>
<a name="l00027"></a>00027
<a name="l00028"></a>00028
<a name="l00029"></a>00029
<a name="l00030"></a>00030
<a name="l00031"></a><a class="code" href="lc7981_8h.html#8e945df7ca614325cafa08258e82a63c">00031</a> <span class="preprocessor">#define LCD_CTRL PORTC </span>
<a name="l00032"></a><a class="code" href="lc7981_8h.html#4b6c8400da9a1ca3d4d83f3ef1f9c34a">00032</a> <span class="preprocessor">#define LCD_CRTL_DDR DDRC </span>
<a name="l00033"></a><a class="code" href="lc7981_8h.html#4781e073871c6f27f89b9463ad3a4ed1">00033</a> <span class="preprocessor">#define LCD_RS PC4 </span>
<a name="l00034"></a><a class="code" href="lc7981_8h.html#26089a10ddd59a0dc7283c19ccc02533">00034</a> <span class="preprocessor">#define LCD_RW PC2 </span>
<a name="l00035"></a><a class="code" href="lc7981_8h.html#1640ffbc0d8ec0f7edb04a2b93918072">00035</a> <span class="preprocessor">#define LCD_EN PC0 </span>
<a name="l00036"></a>00036 <span class="preprocessor"></span>
<a name="l00037"></a>00037 <span class="preprocessor"></span>
<a name="l00038"></a>00038
<a name="l00039"></a><a class="code" href="lc7981_8h.html#25e9d818788f36ed74d7c4579f87f2a6">00039</a> <span class="preprocessor">#define LCD_DATA PORTD </span>
<a name="l00040"></a><a class="code" href="lc7981_8h.html#0c114e723aa4c162c415fb6d4d963dd7">00040</a> <span class="preprocessor">#define LCD_DATA_DDR DDRD </span>
<a name="l00041"></a>00041 <span class="preprocessor"></span>
<a name="l00042"></a>00042 <span class="preprocessor"></span><span class="comment">// Macros for (un)setting the control pins</span>
<a name="l00043"></a><a class="code" href="lc7981_8h.html#795b48274d3f80bc744a707b67fd93e9">00043</a> <span class="preprocessor">#define lcd_rs_high() (LCD_CTRL |= (1 &lt;&lt; LCD_RS)) </span>
<a name="l00044"></a><a class="code" href="lc7981_8h.html#6edb13d59460246fb4cc32ada1c9f4a8">00044</a> <span class="preprocessor">#define lcd_rs_low() (LCD_CTRL &amp;= ~(1 &lt;&lt; LCD_RS)) </span>
<a name="l00045"></a>00045 <span class="preprocessor"></span>
<a name="l00046"></a><a class="code" href="lc7981_8h.html#d0ce3cd9b481370ad4de36eff08440c8">00046</a> <span class="preprocessor"></span><span class="preprocessor">#define lcd_rw_high() (LCD_CTRL |= (1 &lt;&lt; LCD_RW)) </span>
<a name="l00047"></a><a class="code" href="lc7981_8h.html#7f5ebe0ca71b1298a7d3423850cc82b1">00047</a> <span class="preprocessor">#define lcd_rw_low() (LCD_CTRL &amp;= ~(1 &lt;&lt; LCD_RW)) </span>
<a name="l00031"></a>00031 <span class="preprocessor">#ifndef LC7981_H_</span>
<a name="l00032"></a><a class="code" href="lc7981_8h.html#e6ff861bd55f4dc46f25f5f6abfca15f">00032</a> <span class="preprocessor"></span><span class="preprocessor">#define LC7981_H_ LC7981_H_ </span>
<a name="l00033"></a>00033 <span class="preprocessor"></span>
<a name="l00034"></a>00034 <span class="preprocessor"></span><span class="preprocessor">#include &lt;avr/io.h&gt;</span>
<a name="l00035"></a>00035 <span class="preprocessor">#include &lt;util/delay.h&gt;</span>
<a name="l00036"></a>00036 <span class="preprocessor">#include &lt;avr/pgmspace.h&gt;</span>
<a name="l00037"></a>00037
<a name="l00038"></a><a class="code" href="lc7981_8h.html#8e945df7ca614325cafa08258e82a63c">00038</a> <span class="preprocessor">#define LCD_CTRL PORTC </span>
<a name="l00039"></a><a class="code" href="lc7981_8h.html#4b6c8400da9a1ca3d4d83f3ef1f9c34a">00039</a> <span class="preprocessor">#define LCD_CRTL_DDR DDRC </span>
<a name="l00040"></a><a class="code" href="lc7981_8h.html#4781e073871c6f27f89b9463ad3a4ed1">00040</a> <span class="preprocessor">#define LCD_RS PC4 </span>
<a name="l00041"></a><a class="code" href="lc7981_8h.html#26089a10ddd59a0dc7283c19ccc02533">00041</a> <span class="preprocessor">#define LCD_RW PC2 </span>
<a name="l00042"></a><a class="code" href="lc7981_8h.html#1640ffbc0d8ec0f7edb04a2b93918072">00042</a> <span class="preprocessor">#define LCD_EN PC0 </span>
<a name="l00043"></a>00043 <span class="preprocessor"></span>
<a name="l00044"></a>00044 <span class="preprocessor"></span>
<a name="l00045"></a>00045
<a name="l00046"></a><a class="code" href="lc7981_8h.html#25e9d818788f36ed74d7c4579f87f2a6">00046</a> <span class="preprocessor">#define LCD_DATA PORTD </span>
<a name="l00047"></a><a class="code" href="lc7981_8h.html#0c114e723aa4c162c415fb6d4d963dd7">00047</a> <span class="preprocessor">#define LCD_DATA_DDR DDRD </span>
<a name="l00048"></a>00048 <span class="preprocessor"></span>
<a name="l00049"></a><a class="code" href="lc7981_8h.html#e14be306d3620577abc8613d40401b04">00049</a> <span class="preprocessor"></span><span class="preprocessor">#define lcd_en_high() (LCD_CTRL |= (1 &lt;&lt; LCD_EN)) </span>
<a name="l00050"></a><a class="code" href="lc7981_8h.html#d8dcdb36a9410fd96b2c936b7c9355dd">00050</a> <span class="preprocessor">#define lcd_en_low() (LCD_CTRL &amp;= ~(1 &lt;&lt; LCD_EN)) </span>
<a name="l00051"></a>00051 <span class="preprocessor"></span>
<a name="l00049"></a>00049 <span class="preprocessor"></span><span class="comment">// Macros for (un)setting the control pins</span>
<a name="l00050"></a><a class="code" href="lc7981_8h.html#795b48274d3f80bc744a707b67fd93e9">00050</a> <span class="preprocessor">#define lcd_rs_high() (LCD_CTRL |= (1 &lt;&lt; LCD_RS)) </span>
<a name="l00051"></a><a class="code" href="lc7981_8h.html#6edb13d59460246fb4cc32ada1c9f4a8">00051</a> <span class="preprocessor">#define lcd_rs_low() (LCD_CTRL &amp;= ~(1 &lt;&lt; LCD_RS)) </span>
<a name="l00052"></a>00052 <span class="preprocessor"></span>
<a name="l00053"></a><a class="code" href="lc7981_8h.html#90a69d37f5c80f3ded970acf2dacf4c0">00053</a> <span class="preprocessor">#define LCD_TEXT 0 </span>
<a name="l00054"></a><a class="code" href="lc7981_8h.html#720ef60606ac38ca3a5ab96a9c2b8168">00054</a> <span class="preprocessor">#define LCD_TEXT_LINES 10 </span>
<a name="l00055"></a><a class="code" href="lc7981_8h.html#82f0a630f3c41b5233f2ceb07c7dd736">00055</a> <span class="preprocessor">#define LCD_TEXT_COLUMNS 26 </span>
<a name="l00056"></a>00056 <span class="preprocessor"></span>
<a name="l00057"></a><a class="code" href="lc7981_8h.html#dfaedf8da8e73d39a98d709b519a3117">00057</a> <span class="preprocessor"></span><span class="preprocessor">#define LCD_GRAPHIC 1 </span>
<a name="l00058"></a><a class="code" href="lc7981_8h.html#51e83be6f6929f2a29d5467cd937dfc6">00058</a> <span class="preprocessor">#define LCD_GRAPHIC_WIDTH 160 </span>
<a name="l00059"></a><a class="code" href="lc7981_8h.html#70265c4f840ef78872243e91c923af2f">00059</a> <span class="preprocessor">#define LCD_GRAPHIC_HEIGHT 80 </span>
<a name="l00060"></a><a class="code" href="lc7981_8h.html#eb2d212a26da4a5a4d3231b2773023e5">00060</a> <span class="preprocessor">#define PIXEL_ON 1 </span>
<a name="l00061"></a><a class="code" href="lc7981_8h.html#cda2f1b1cf6310700d0d91643c40e068">00061</a> <span class="preprocessor">#define PIXEL_OFF 0 </span>
<a name="l00062"></a>00062 <span class="preprocessor"></span>
<a name="l00063"></a>00063 <span class="preprocessor"></span><span class="keywordtype">void</span> <a class="code" href="lc7981_8c.html#9b18aca098d68e55bd7dd4b83f4f36e9" title="lcd_init set the to default values.">lcd_init</a>(uint8_t mode);
<a name="l00064"></a>00064 <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="lc7981_8c.html#35c08b1fa742e650f4873939707b893b" title="Clears the display by setting the whole memory to 0.">lcd_clear</a>();
<a name="l00065"></a>00065
<a name="l00066"></a>00066 <span class="keywordtype">void</span> <a class="code" href="lc7981_8c.html#30251238a49999658455fdb0233757fb">lcd_write_text</a>(<span class="keywordtype">char</span> *txt);
<a name="l00067"></a>00067 <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="lc7981_8c.html#dbf47a5efdf02367ded1ebf8f9edb5fe" title="Set the display cursor to a specific location.">lcd_gotoxy</a>(uint8_t x, uint8_t y);
<a name="l00068"></a>00068
<a name="l00069"></a>00069 <span class="keywordtype">void</span> <a class="code" href="lc7981_8c.html#735111507ed83172f58d5af2953e31c6" title="set or unset a pixel at the specified location">lcd_plot_pixel</a>(uint8_t x, uint8_t y, uint8_t <span class="keyword">set</span>);
<a name="l00070"></a>00070 <span class="keywordtype">void</span> <a class="code" href="lc7981_8c.html#f3b584ee8235c6ed4ebefc50f8a95915" title="This function will plot a bitmap with the upper left corner to the given coordinates...">lcd_plot_bitmap</a>(uint8_t x, uint8_t y, <span class="keyword">const</span> uint8_t *bitmap, uint8_t w, uint8_t h);
<a name="l00071"></a>00071
<a name="l00053"></a><a class="code" href="lc7981_8h.html#d0ce3cd9b481370ad4de36eff08440c8">00053</a> <span class="preprocessor"></span><span class="preprocessor">#define lcd_rw_high() (LCD_CTRL |= (1 &lt;&lt; LCD_RW)) </span>
<a name="l00054"></a><a class="code" href="lc7981_8h.html#7f5ebe0ca71b1298a7d3423850cc82b1">00054</a> <span class="preprocessor">#define lcd_rw_low() (LCD_CTRL &amp;= ~(1 &lt;&lt; LCD_RW)) </span>
<a name="l00055"></a>00055 <span class="preprocessor"></span>
<a name="l00056"></a><a class="code" href="lc7981_8h.html#e14be306d3620577abc8613d40401b04">00056</a> <span class="preprocessor"></span><span class="preprocessor">#define lcd_en_high() (LCD_CTRL |= (1 &lt;&lt; LCD_EN)) </span>
<a name="l00057"></a><a class="code" href="lc7981_8h.html#d8dcdb36a9410fd96b2c936b7c9355dd">00057</a> <span class="preprocessor">#define lcd_en_low() (LCD_CTRL &amp;= ~(1 &lt;&lt; LCD_EN)) </span>
<a name="l00058"></a>00058 <span class="preprocessor"></span>
<a name="l00059"></a>00059 <span class="preprocessor"></span>
<a name="l00060"></a><a class="code" href="lc7981_8h.html#90a69d37f5c80f3ded970acf2dacf4c0">00060</a> <span class="preprocessor">#define LCD_TEXT 0 </span>
<a name="l00061"></a><a class="code" href="lc7981_8h.html#720ef60606ac38ca3a5ab96a9c2b8168">00061</a> <span class="preprocessor">#define LCD_TEXT_LINES 10 </span>
<a name="l00062"></a><a class="code" href="lc7981_8h.html#82f0a630f3c41b5233f2ceb07c7dd736">00062</a> <span class="preprocessor">#define LCD_TEXT_COLUMNS 26 </span>
<a name="l00063"></a>00063 <span class="preprocessor"></span>
<a name="l00064"></a><a class="code" href="lc7981_8h.html#dfaedf8da8e73d39a98d709b519a3117">00064</a> <span class="preprocessor"></span><span class="preprocessor">#define LCD_GRAPHIC 1 </span>
<a name="l00065"></a><a class="code" href="lc7981_8h.html#51e83be6f6929f2a29d5467cd937dfc6">00065</a> <span class="preprocessor">#define LCD_GRAPHIC_WIDTH 160 </span>
<a name="l00066"></a><a class="code" href="lc7981_8h.html#70265c4f840ef78872243e91c923af2f">00066</a> <span class="preprocessor">#define LCD_GRAPHIC_HEIGHT 80 </span>
<a name="l00067"></a><a class="code" href="lc7981_8h.html#eb2d212a26da4a5a4d3231b2773023e5">00067</a> <span class="preprocessor">#define PIXEL_ON 1 </span>
<a name="l00068"></a><a class="code" href="lc7981_8h.html#cda2f1b1cf6310700d0d91643c40e068">00068</a> <span class="preprocessor">#define PIXEL_OFF 0 </span>
<a name="l00069"></a>00069 <span class="preprocessor"></span>
<a name="l00070"></a>00070 <span class="preprocessor"></span><span class="keywordtype">void</span> <a class="code" href="lc7981_8c.html#9b18aca098d68e55bd7dd4b83f4f36e9" title="lcd_init set the to default values.">lcd_init</a>(uint8_t mode);
<a name="l00071"></a>00071 <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="lc7981_8c.html#35c08b1fa742e650f4873939707b893b" title="Clears the display by setting the whole memory to 0.">lcd_clear</a>();
<a name="l00072"></a>00072
<a name="l00073"></a>00073 <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="lc7981_8c.html#b4f286d6a313df7a5f692e0b4a9509ad" title="Generates the strobe signal for writing data.">lcd_strobe</a>();
<a name="l00074"></a>00074 <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="lc7981_8c.html#b69146a9179fc5b5deef3fc61cf0208c" title="Writes a command and a data byte to the lcd.">lcd_write_command</a>(uint8_t cmd, uint8_t data);
<a name="l00075"></a>00075 <span class="keyword">inline</span> uint8_t <a class="code" href="lc7981_8c.html#6334333537ad1d0bd51cba1e80f32e74" title="Reads a byte from the display memory.">lcd_read_byte</a>();
<a name="l00076"></a>00076
<a name="l00077"></a>00077 <span class="preprocessor">#endif </span><span class="comment">/* LC7981_H_ */</span>
<a name="l00073"></a>00073 <span class="keywordtype">void</span> <a class="code" href="lc7981_8c.html#30251238a49999658455fdb0233757fb">lcd_write_text</a>(<span class="keywordtype">char</span> *txt);
<a name="l00074"></a>00074 <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="lc7981_8c.html#dbf47a5efdf02367ded1ebf8f9edb5fe" title="Set the display cursor to a specific location.">lcd_gotoxy</a>(uint8_t x, uint8_t y);
<a name="l00075"></a>00075
<a name="l00076"></a>00076 <span class="keywordtype">void</span> <a class="code" href="lc7981_8c.html#735111507ed83172f58d5af2953e31c6" title="set or unset a pixel at the specified location">lcd_plot_pixel</a>(uint8_t x, uint8_t y, uint8_t <span class="keyword">set</span>);
<a name="l00077"></a>00077 <span class="keywordtype">void</span> <a class="code" href="lc7981_8c.html#f3b584ee8235c6ed4ebefc50f8a95915" title="This function will plot a bitmap with the upper left corner to the given coordinates...">lcd_plot_bitmap</a>(uint8_t x, uint8_t y, <span class="keyword">const</span> uint8_t *bitmap, uint8_t w, uint8_t h);
<a name="l00078"></a>00078
<a name="l00079"></a>00079 <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="lc7981_8c.html#9bbbc52f3cb24a861d11b08e1c14bca2">lcd_plot_char</a>(uint8_t x_off, uint8_t y_off, uint8_t c, uint8_t fw, uint8_t fh, <span class="keyword">const</span> uint8_t* font);
<a name="l00080"></a>00080
<a name="l00081"></a>00081
<a name="l00082"></a>00082 <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="lc7981_8c.html#b4f286d6a313df7a5f692e0b4a9509ad" title="Generates the strobe signal for writing data.">lcd_strobe</a>();
<a name="l00083"></a>00083 <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="lc7981_8c.html#b69146a9179fc5b5deef3fc61cf0208c" title="Writes a command and a data byte to the lcd.">lcd_write_command</a>(uint8_t cmd, uint8_t data);
<a name="l00084"></a>00084 <span class="keyword">inline</span> uint8_t <a class="code" href="lc7981_8c.html#6334333537ad1d0bd51cba1e80f32e74" title="Reads a byte from the display memory.">lcd_read_byte</a>();
<a name="l00085"></a>00085
<a name="l00086"></a>00086 <span class="preprocessor">#endif </span><span class="comment">/* LC7981_H_ */</span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sun May 17 18:34:49 2009 for glcd by&nbsp;
<hr size="1"><address style="text-align: right;"><small>Generated on Tue May 19 21:40:21 2009 for glcd by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address>
</body>

View File

@ -106,6 +106,8 @@
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="lc7981_8h.html#175d691feb304584c8c18e6456e07401">lcd_plot_bitmap</a> (uint8_t x, uint8_t y, const uint8_t *bitmap, uint8_t w, uint8_t h)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This function will plot a bitmap with the upper left corner to the given coordinates. <a href="#175d691feb304584c8c18e6456e07401"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="lc7981_8h.html#9bbbc52f3cb24a861d11b08e1c14bca2">lcd_plot_char</a> (uint8_t x_off, uint8_t y_off, uint8_t c, uint8_t fw, uint8_t fh, const uint8_t *font)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="lc7981_8h.html#b4f286d6a313df7a5f692e0b4a9509ad">lcd_strobe</a> ()</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Generates the strobe signal for writing data. <a href="#b4f286d6a313df7a5f692e0b4a9509ad"></a><br></td></tr>
@ -646,7 +648,7 @@ lcd_init set the to default values.
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"></td>
<td></td><td></td><td width="100%"><code> [inline]</code></td>
</tr>
</table>
</div>
@ -674,6 +676,59 @@ This function will plot a bitmap with the upper left corner to the given coordin
This function is dedicated to Greta, one of the most important persons in my life so far.<br>
Even though I can't remember her actual name.<br>
</div>
</div><p>
<a class="anchor" name="9bbbc52f3cb24a861d11b08e1c14bca2"></a><!-- doxytag: member="lc7981.h::lcd_plot_char" ref="9bbbc52f3cb24a861d11b08e1c14bca2" args="(uint8_t x_off, uint8_t y_off, uint8_t c, uint8_t fw, uint8_t fh, const uint8_t *font)" -->
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void lcd_plot_char </td>
<td>(</td>
<td class="paramtype">uint8_t&nbsp;</td>
<td class="paramname"> <em>x_off</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&nbsp;</td>
<td class="paramname"> <em>y_off</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&nbsp;</td>
<td class="paramname"> <em>c</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&nbsp;</td>
<td class="paramname"> <em>fw</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">uint8_t&nbsp;</td>
<td class="paramname"> <em>fh</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">const uint8_t *&nbsp;</td>
<td class="paramname"> <em>font</em></td><td>&nbsp;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td><td width="100%"><code> [inline]</code></td>
</tr>
</table>
</div>
<div class="memdoc">
<p>
</div>
</div><p>
<a class="anchor" name="735111507ed83172f58d5af2953e31c6"></a><!-- doxytag: member="lc7981.h::lcd_plot_pixel" ref="735111507ed83172f58d5af2953e31c6" args="(uint8_t x, uint8_t y, uint8_t set)" -->
@ -823,7 +878,7 @@ Writes a command and a data byte to the lcd.
</div>
</div><p>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sun May 17 18:34:49 2009 for glcd by&nbsp;
<hr size="1"><address style="text-align: right;"><small>Generated on Tue May 19 21:40:21 2009 for glcd by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address>
</body>

View File

@ -18,6 +18,8 @@
<code>#include &lt;stdlib.h&gt;</code><br>
<code>#include &quot;<a class="el" href="lc7981_8h-source.html">include/lc7981.h</a>&quot;</code><br>
<code>#include &quot;<a class="el" href="button_8h-source.html">button.h</a>&quot;</code><br>
<code>#include &quot;<a class="el" href="12x16__horizontal__LSB__1_8h-source.html">12x16_horizontal_LSB_1.h</a>&quot;</code><br>
<code>#include &quot;<a class="el" href="8x8__horizontal__LSB__1_8h-source.html">8x8_horizontal_LSB_1.h</a>&quot;</code><br>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
@ -45,7 +47,7 @@
</div>
</div><p>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sun May 17 18:34:49 2009 for glcd by&nbsp;
<hr size="1"><address style="text-align: right;"><small>Generated on Tue May 19 21:40:21 2009 for glcd by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.5 </small></address>
</body>

View File

@ -10,8 +10,8 @@
{\fancyplain{}{\bfseries\rightmark}}
\rhead[\fancyplain{}{\bfseries\leftmark}]
{\fancyplain{}{\bfseries\thepage}}
\rfoot[\fancyplain{}{\bfseries\scriptsize Generated on Sun May 17 18:34:49 2009 for glcd by Doxygen }]{}
\lfoot[]{\fancyplain{}{\bfseries\scriptsize Generated on Sun May 17 18:34:49 2009 for glcd by Doxygen }}
\rfoot[\fancyplain{}{\bfseries\scriptsize Generated on Tue May 19 21:40:21 2009 for glcd by Doxygen }]{}
\lfoot[]{\fancyplain{}{\bfseries\scriptsize Generated on Tue May 19 21:40:21 2009 for glcd by Doxygen }}
\cfoot{}
\newenvironment{Code}
{\footnotesize}

View File

@ -1,5 +1,7 @@
\section{File List}
Here is a list of all files with brief descriptions:\begin{CompactList}
\item\contentsline{section}{{\bf 12x16\_\-horizontal\_\-LSB\_\-1.h} }{\pageref{12x16__horizontal__LSB__1_8h}}{}
\item\contentsline{section}{{\bf 8x8\_\-horizontal\_\-LSB\_\-1.h} }{\pageref{8x8__horizontal__LSB__1_8h}}{}
\item\contentsline{section}{{\bf button.h} }{\pageref{button_8h}}{}
\item\contentsline{section}{{\bf main.c} }{\pageref{main_8c}}{}
\item\contentsline{section}{include/{\bf lc7981.c} }{\pageref{lc7981_8c}}{}

View File

@ -21,7 +21,11 @@ void {\bf lcd\_\-gotoxy} (uint8\_\-t x, uint8\_\-t y)
void {\bf lcd\_\-plot\_\-pixel} (uint8\_\-t x, uint8\_\-t y, uint8\_\-t set)
\begin{CompactList}\small\item\em set or unset a pixel at the specified location \item\end{CompactList}\item
void {\bf lcd\_\-plot\_\-bitmap} (uint8\_\-t x\_\-off, uint8\_\-t y\_\-off, const uint8\_\-t $\ast$bitmap, uint8\_\-t w, uint8\_\-t h)
\begin{CompactList}\small\item\em This function will plot a bitmap with the upper left corner to the given coordinates. \item\end{CompactList}\end{CompactItemize}
\begin{CompactList}\small\item\em This function will plot a bitmap with the upper left corner to the given coordinates. \item\end{CompactList}\item
void {\bf lcd\_\-plot\_\-char} (uint8\_\-t x\_\-off, uint8\_\-t y\_\-off, uint8\_\-t c, uint8\_\-t fw, uint8\_\-t fh, const uint8\_\-t $\ast$font)
\item
void {\bf lcd\_\-plot\_\-text} (uint8\_\-t x\_\-off, uint8\_\-t y\_\-off, const char $\ast$text, const uint8\_\-t $\ast$font)
\end{CompactItemize}
\subsection*{Variables}
\begin{CompactItemize}
\item
@ -68,7 +72,7 @@ lcd\_\-init set the to default values.
\end{Desc}
\index{lc7981.c@{lc7981.c}!lcd\_\-plot\_\-bitmap@{lcd\_\-plot\_\-bitmap}}
\index{lcd\_\-plot\_\-bitmap@{lcd\_\-plot\_\-bitmap}!lc7981.c@{lc7981.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void lcd\_\-plot\_\-bitmap (uint8\_\-t {\em x\_\-off}, \/ uint8\_\-t {\em y\_\-off}, \/ const uint8\_\-t $\ast$ {\em bitmap}, \/ uint8\_\-t {\em w}, \/ uint8\_\-t {\em h})}\label{lc7981_8c_f3b584ee8235c6ed4ebefc50f8a95915}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void lcd\_\-plot\_\-bitmap (uint8\_\-t {\em x\_\-off}, \/ uint8\_\-t {\em y\_\-off}, \/ const uint8\_\-t $\ast$ {\em bitmap}, \/ uint8\_\-t {\em w}, \/ uint8\_\-t {\em h})\hspace{0.3cm}{\tt [inline]}}\label{lc7981_8c_f3b584ee8235c6ed4ebefc50f8a95915}
This function will plot a bitmap with the upper left corner to the given coordinates.
@ -88,7 +92,12 @@ This function will plot a bitmap with the upper left corner to the given coordin
\end{Desc}
This function is dedicated to Greta, one of the most important persons in my life so far.\par
Even though I can't remember her actual name.\par
\index{lc7981.c@{lc7981.c}!lcd\_\-plot\_\-pixel@{lcd\_\-plot\_\-pixel}}
\index{lc7981.c@{lc7981.c}!lcd\_\-plot\_\-char@{lcd\_\-plot\_\-char}}
\index{lcd\_\-plot\_\-char@{lcd\_\-plot\_\-char}!lc7981.c@{lc7981.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void lcd\_\-plot\_\-char (uint8\_\-t {\em x\_\-off}, \/ uint8\_\-t {\em y\_\-off}, \/ uint8\_\-t {\em c}, \/ uint8\_\-t {\em fw}, \/ uint8\_\-t {\em fh}, \/ const uint8\_\-t $\ast$ {\em font})\hspace{0.3cm}{\tt [inline]}}\label{lc7981_8c_9bbbc52f3cb24a861d11b08e1c14bca2}
\index{lc7981.c@{lc7981.c}!lcd\_\-plot\_\-pixel@{lcd\_\-plot\_\-pixel}}
\index{lcd\_\-plot\_\-pixel@{lcd\_\-plot\_\-pixel}!lc7981.c@{lc7981.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void lcd\_\-plot\_\-pixel (uint8\_\-t {\em x}, \/ uint8\_\-t {\em y}, \/ uint8\_\-t {\em set})}\label{lc7981_8c_735111507ed83172f58d5af2953e31c6}
@ -100,6 +109,11 @@ set or unset a pixel at the specified location
\begin{description}
\item[{\em x}]horizontal position of the pixel (starts at 0) \item[{\em y}]horizontal position of the pixel (starts at 0) \item[{\em set}]can be PIXEL\_\-ON or PIXEL\_\-OFF \end{description}
\end{Desc}
\index{lc7981.c@{lc7981.c}!lcd\_\-plot\_\-text@{lcd\_\-plot\_\-text}}
\index{lcd\_\-plot\_\-text@{lcd\_\-plot\_\-text}!lc7981.c@{lc7981.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void lcd\_\-plot\_\-text (uint8\_\-t {\em x\_\-off}, \/ uint8\_\-t {\em y\_\-off}, \/ const char $\ast$ {\em text}, \/ const uint8\_\-t $\ast$ {\em font})}\label{lc7981_8c_1e956901a8e75f3d7264d8e0e9ccaf60}
\index{lc7981.c@{lc7981.c}!lcd\_\-read\_\-byte@{lcd\_\-read\_\-byte}}
\index{lcd\_\-read\_\-byte@{lcd\_\-read\_\-byte}!lc7981.c@{lc7981.c}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}uint8\_\-t lcd\_\-read\_\-byte ()\hspace{0.3cm}{\tt [inline]}}\label{lc7981_8c_6334333537ad1d0bd51cba1e80f32e74}

View File

@ -65,6 +65,8 @@ void {\bf lcd\_\-plot\_\-pixel} (uint8\_\-t x, uint8\_\-t y, uint8\_\-t set)
\begin{CompactList}\small\item\em set or unset a pixel at the specified location \item\end{CompactList}\item
void {\bf lcd\_\-plot\_\-bitmap} (uint8\_\-t x, uint8\_\-t y, const uint8\_\-t $\ast$bitmap, uint8\_\-t w, uint8\_\-t h)
\begin{CompactList}\small\item\em This function will plot a bitmap with the upper left corner to the given coordinates. \item\end{CompactList}\item
void {\bf lcd\_\-plot\_\-char} (uint8\_\-t x\_\-off, uint8\_\-t y\_\-off, uint8\_\-t c, uint8\_\-t fw, uint8\_\-t fh, const uint8\_\-t $\ast$font)
\item
void {\bf lcd\_\-strobe} ()
\begin{CompactList}\small\item\em Generates the strobe signal for writing data. \item\end{CompactList}\item
void {\bf lcd\_\-write\_\-command} (uint8\_\-t cmd, uint8\_\-t data)
@ -267,7 +269,7 @@ lcd\_\-init set the to default values.
\end{Desc}
\index{lc7981.h@{lc7981.h}!lcd\_\-plot\_\-bitmap@{lcd\_\-plot\_\-bitmap}}
\index{lcd\_\-plot\_\-bitmap@{lcd\_\-plot\_\-bitmap}!lc7981.h@{lc7981.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void lcd\_\-plot\_\-bitmap (uint8\_\-t {\em x\_\-off}, \/ uint8\_\-t {\em y\_\-off}, \/ const uint8\_\-t $\ast$ {\em bitmap}, \/ uint8\_\-t {\em w}, \/ uint8\_\-t {\em h})}\label{lc7981_8h_175d691feb304584c8c18e6456e07401}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void lcd\_\-plot\_\-bitmap (uint8\_\-t {\em x\_\-off}, \/ uint8\_\-t {\em y\_\-off}, \/ const uint8\_\-t $\ast$ {\em bitmap}, \/ uint8\_\-t {\em w}, \/ uint8\_\-t {\em h})\hspace{0.3cm}{\tt [inline]}}\label{lc7981_8h_175d691feb304584c8c18e6456e07401}
This function will plot a bitmap with the upper left corner to the given coordinates.
@ -287,7 +289,12 @@ This function will plot a bitmap with the upper left corner to the given coordin
\end{Desc}
This function is dedicated to Greta, one of the most important persons in my life so far.\par
Even though I can't remember her actual name.\par
\index{lc7981.h@{lc7981.h}!lcd\_\-plot\_\-pixel@{lcd\_\-plot\_\-pixel}}
\index{lc7981.h@{lc7981.h}!lcd\_\-plot\_\-char@{lcd\_\-plot\_\-char}}
\index{lcd\_\-plot\_\-char@{lcd\_\-plot\_\-char}!lc7981.h@{lc7981.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void lcd\_\-plot\_\-char (uint8\_\-t {\em x\_\-off}, \/ uint8\_\-t {\em y\_\-off}, \/ uint8\_\-t {\em c}, \/ uint8\_\-t {\em fw}, \/ uint8\_\-t {\em fh}, \/ const uint8\_\-t $\ast$ {\em font})\hspace{0.3cm}{\tt [inline]}}\label{lc7981_8h_9bbbc52f3cb24a861d11b08e1c14bca2}
\index{lc7981.h@{lc7981.h}!lcd\_\-plot\_\-pixel@{lcd\_\-plot\_\-pixel}}
\index{lcd\_\-plot\_\-pixel@{lcd\_\-plot\_\-pixel}!lc7981.h@{lc7981.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void lcd\_\-plot\_\-pixel (uint8\_\-t {\em x}, \/ uint8\_\-t {\em y}, \/ uint8\_\-t {\em set})}\label{lc7981_8h_735111507ed83172f58d5af2953e31c6}

View File

@ -4,6 +4,8 @@
{\tt \#include $<$stdlib.h$>$}\par
{\tt \#include \char`\"{}include/lc7981.h\char`\"{}}\par
{\tt \#include \char`\"{}button.h\char`\"{}}\par
{\tt \#include \char`\"{}12x16\_\-horizontal\_\-LSB\_\-1.h\char`\"{}}\par
{\tt \#include \char`\"{}8x8\_\-horizontal\_\-LSB\_\-1.h\char`\"{}}\par
\subsection*{Functions}
\begin{CompactItemize}
\item

View File

@ -21,7 +21,7 @@
\vspace*{1cm}
{\large Generated by Doxygen 1.5.5}\\
\vspace*{0.5cm}
{\small Sun May 17 18:34:49 2009}\\
{\small Tue May 19 21:40:21 2009}\\
\end{center}
\end{titlepage}
\clearemptydoublepage
@ -32,7 +32,9 @@
\chapter{File Index}
\input{files}
\chapter{File Documentation}
\input{button_8h}
\input{12x16__horizontal__LSB__1_8h}
\include{8x8__horizontal__LSB__1_8h}
\include{button_8h}
\include{lc7981_8c}
\include{lc7981_8h}
\include{main_8c}

View File

@ -267,6 +267,7 @@ uint8_t xr;
}
}
/**
* This function will plot a bitmap with the upper left corner to the given coordinates.\n
* If the bitmap doesn't fit on the display at this location, nothing is drawn at all.\n
@ -333,3 +334,34 @@ uint16_t pos;
}
}
inline void lcd_plot_char(uint8_t x_off, uint8_t y_off, uint8_t c, uint8_t fw, uint8_t fh, const uint8_t* font) {
const uint8_t *letter;
uint8_t fsize;
fsize = fh * fw / 8;
letter = font + c * fsize -1;
lcd_plot_bitmap(x_off,y_off,letter,fw,fh);
}
void lcd_plot_text(uint8_t x_off, uint8_t y_off, const char *text, uint8_t fw, uint8_t fh, const uint8_t *font) {
while(*text) {
lcd_plot_char(x_off,y_off,(uint8_t) *text,fw,fh,font);
x_off += fw;
text++;
}
}
void lcd_plot_pgmtext(uint8_t x_off, uint8_t y_off, const char *text, uint8_t fw, uint8_t fh, const uint8_t *font) {
}

View File

@ -19,8 +19,15 @@
* You should have received a copy of the GNU General Public License
* along with Sebastians AVR Library. If not, see <http://www.gnu.org/licenses/>.
*
*
* 'Do the thing you want to do and let your spirits guide you through.
* Live a life, worth being remembered.'
* -- Remembered - Firewind --
*/
#ifndef LC7981_H_
#define LC7981_H_ LC7981_H_ //!< protects this file from beeing double included
@ -69,6 +76,9 @@ inline void lcd_gotoxy(uint8_t x, uint8_t y);
void lcd_plot_pixel(uint8_t x, uint8_t y, uint8_t set);
void lcd_plot_bitmap(uint8_t x, uint8_t y, const uint8_t *bitmap, uint8_t w, uint8_t h);
inline void lcd_plot_char(uint8_t x_off, uint8_t y_off, uint8_t c, uint8_t fw, uint8_t fh, const uint8_t* font);
void lcd_plot_text(uint8_t x_off, uint8_t y_off, const char *text, uint8_t fw, uint8_t fh, const uint8_t *font);
inline void lcd_strobe();
inline void lcd_write_command(uint8_t cmd, uint8_t data);

37
main.c
View File

@ -10,17 +10,50 @@
#include "include/lc7981.h"
#include "button.h"
#include "12x16_horizontal_LSB_1.h"
#include "8x8_horizontal_LSB_1.h"
int main() {
uint8_t x,y;
const uint8_t *button;
uint16_t pos;
const uint8_t *letter;
lcd_init(LCD_GRAPHIC);
//while(1) {
lcd_plot_text(5,5,"Hello",16,16,font_12x16);
lcd_plot_text(50,22,"World",16,16,font_12x16);
lcd_plot_text(5,40,"Hallo Welt !",8,8,font_8x8);
/*for(x = 1; x < 10; x++) {
_delay_ms(500);
}
lcd_clear();
for(x = 31; x > 0; x--) {
lcd_plot_char(x,12,'A',12,16,font_12x16);
_delay_ms(500);
lcd_clear();
}
}
*/
/*
while(1) {
for(y = 1; y <= 32; y++) {
lcd_plot_bitmap(16+y,16,bitmap,32,32);
@ -34,7 +67,7 @@ int main() {
lcd_clear();
}
}
*/
/*draw_penguin(); */