2009-05-16 14:10:42 +02:00
\section { include/lc7981.h File Reference}
\label { lc7981_ 8h} \index { include/lc7981.h@{ include/lc7981.h} }
{ \tt \# include $ < $ avr/io.h$ > $ } \par
{ \tt \# include $ < $ util/delay.h$ > $ } \par
{ \tt \# include $ < $ avr/pgmspace.h$ > $ } \par
\subsection * { Defines}
\begin { CompactItemize}
\item
\# define { \bf LC7981\_ \- H\_ \- } ~LC7981\_ \- H\_ \-
2009-05-17 18:35:27 +02:00
\begin { CompactList} \small \item \em protects this file from beeing double included \item \end { CompactList} \item
2009-05-16 14:10:42 +02:00
\# define { \bf LCD\_ \- CTRL} ~PORTC
2009-05-17 18:35:27 +02:00
\begin { CompactList} \small \item \em Port used for control signals. \item \end { CompactList} \item
2009-05-16 14:10:42 +02:00
\# define { \bf LCD\_ \- CRTL\_ \- DDR} ~DDRC
2009-05-17 18:35:27 +02:00
\begin { CompactList} \small \item \em Data-Direction-Register for the control signals. \item \end { CompactList} \item
2009-05-16 14:10:42 +02:00
\# define { \bf LCD\_ \- RS} ~PC4
2009-05-17 18:35:27 +02:00
\begin { CompactList} \small \item \em Register-Select Pin of the Display. \item \end { CompactList} \item
2009-05-16 14:10:42 +02:00
\# define { \bf LCD\_ \- RW} ~PC2
2009-05-17 18:35:27 +02:00
\begin { CompactList} \small \item \em Read-Write-select Pin. \item \end { CompactList} \item
2009-05-16 14:10:42 +02:00
\# define { \bf LCD\_ \- EN} ~PC0
2009-05-17 18:35:27 +02:00
\begin { CompactList} \small \item \em Strobe Pin. \item \end { CompactList} \item
2009-05-16 14:10:42 +02:00
\# define { \bf LCD\_ \- DATA} ~PORTD
2009-05-17 18:35:27 +02:00
\begin { CompactList} \small \item \em Port used for data. \item \end { CompactList} \item
2009-05-16 14:10:42 +02:00
\# define { \bf LCD\_ \- DATA\_ \- DDR} ~DDRD
2009-05-17 18:35:27 +02:00
\begin { CompactList} \small \item \em Data-Direction-Register for Data. \item \end { CompactList} \item
2009-05-16 14:10:42 +02:00
\# define { \bf lcd\_ \- rs\_ \- high} ()~(LCD\_ \- CTRL $ | $ = (1 $ < $ $ < $ LCD\_ \- RS))
2009-05-17 18:35:27 +02:00
\begin { CompactList} \small \item \em Set the Register-Select pin high. \item \end { CompactList} \item
2009-05-16 14:10:42 +02:00
\# define { \bf lcd\_ \- rs\_ \- low} ()~(LCD\_ \- CTRL \& = $ \sim $ (1 $ < $ $ < $ LCD\_ \- RS))
2009-05-17 18:35:27 +02:00
\begin { CompactList} \small \item \em Set the Register-Select pin low. \item \end { CompactList} \item
2009-05-16 14:10:42 +02:00
\# define { \bf lcd\_ \- rw\_ \- high} ()~(LCD\_ \- CTRL $ | $ = (1 $ < $ $ < $ LCD\_ \- RW))
2009-05-17 18:35:27 +02:00
\begin { CompactList} \small \item \em Set the Read-Write-Select pin high. \item \end { CompactList} \item
2009-05-16 14:10:42 +02:00
\# define { \bf lcd\_ \- rw\_ \- low} ()~(LCD\_ \- CTRL \& = $ \sim $ (1 $ < $ $ < $ LCD\_ \- RW))
2009-05-17 18:35:27 +02:00
\begin { CompactList} \small \item \em Set the Register-Select pin low. \item \end { CompactList} \item
2009-05-16 14:10:42 +02:00
\# define { \bf lcd\_ \- en\_ \- high} ()~(LCD\_ \- CTRL $ | $ = (1 $ < $ $ < $ LCD\_ \- EN))
2009-05-17 18:35:27 +02:00
\begin { CompactList} \small \item \em Set the strobe pin high. \item \end { CompactList} \item
2009-05-16 14:10:42 +02:00
\# define { \bf lcd\_ \- en\_ \- low} ()~(LCD\_ \- CTRL \& = $ \sim $ (1 $ < $ $ < $ LCD\_ \- EN))
2009-05-17 18:35:27 +02:00
\begin { CompactList} \small \item \em Set the strobe pin low. \item \end { CompactList} \item
2009-05-16 14:10:42 +02:00
\# define { \bf LCD\_ \- TEXT} ~0
2009-05-17 18:35:27 +02:00
\begin { CompactList} \small \item \em Constant for text mode. \item \end { CompactList} \item
2009-05-16 14:10:42 +02:00
\# define { \bf LCD\_ \- TEXT\_ \- LINES} ~10
2009-05-17 18:35:27 +02:00
\begin { CompactList} \small \item \em Number of lines in text mode. \item \end { CompactList} \item
2009-05-16 14:10:42 +02:00
\# define { \bf LCD\_ \- TEXT\_ \- COLUMNS} ~26
2009-05-17 18:35:27 +02:00
\begin { CompactList} \small \item \em Number of columns in text mode. \item \end { CompactList} \item
2009-05-16 14:10:42 +02:00
\# define { \bf LCD\_ \- GRAPHIC} ~1
2009-05-17 18:35:27 +02:00
\begin { CompactList} \small \item \em Constant for graphic mode. \item \end { CompactList} \item
2009-05-16 14:10:42 +02:00
\# define { \bf LCD\_ \- GRAPHIC\_ \- WIDTH} ~160
2009-05-17 18:35:27 +02:00
\begin { CompactList} \small \item \em Horizontal display size in pixels. \item \end { CompactList} \item
2009-05-16 14:10:42 +02:00
\# define { \bf LCD\_ \- GRAPHIC\_ \- HEIGHT} ~80
2009-05-17 18:35:27 +02:00
\begin { CompactList} \small \item \em Vertical display size in pixels. \item \end { CompactList} \item
2009-05-16 14:10:42 +02:00
\# define { \bf PIXEL\_ \- ON} ~1
2009-05-17 18:35:27 +02:00
\begin { CompactList} \small \item \em see lcd\_ \- plot\_ \- pixel \item \end { CompactList} \item
2009-05-16 14:10:42 +02:00
\# define { \bf PIXEL\_ \- OFF} ~0
2009-05-17 18:35:27 +02:00
\begin { CompactList} \small \item \em see lcd\_ \- plot\_ \- pixel \item \end { CompactList} \end { CompactItemize}
2009-05-16 14:10:42 +02:00
\subsection * { Functions}
\begin { CompactItemize}
\item
void { \bf lcd\_ \- init} (uint8\_ \- t mode)
\begin { CompactList} \small \item \em lcd\_ \- init set the to default values. \item \end { CompactList} \item
void { \bf lcd\_ \- clear} ()
\begin { CompactList} \small \item \em Clears the display by setting the whole memory to 0. \item \end { CompactList} \item
void { \bf lcd\_ \- write\_ \- text} (char $ \ast $ txt)
\item
void { \bf lcd\_ \- gotoxy} (uint8\_ \- t x, uint8\_ \- t y)
\begin { CompactList} \small \item \em Set the display cursor to a specific location. \item \end { CompactList} \item
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)
2009-05-16 16:44:24 +02:00
\begin { CompactList} \small \item \em This function will plot a bitmap with the upper left corner to the given coordinates. \item \end { CompactList} \item
2009-05-16 14:10:42 +02:00
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)
\begin { CompactList} \small \item \em Writes a command and a data byte to the lcd. \item \end { CompactList} \item
uint8\_ \- t { \bf lcd\_ \- read\_ \- byte} ()
\begin { CompactList} \small \item \em Reads a byte from the display memory. \item \end { CompactList} \end { CompactItemize}
\subsection { Define Documentation}
\index { lc7981.h@{ lc7981.h} !LC7981\_ \- H\_ \- @{ LC7981\_ \- H\_ \- } }
\index { LC7981\_ \- H\_ \- @{ LC7981\_ \- H\_ \- } !lc7981.h@{ lc7981.h} }
\subsubsection { \setlength { \rightskip } { 0pt plus 5cm} \# define LC7981\_ \- H\_ \- ~LC7981\_ \- H\_ \- } \label { lc7981_ 8h_ e6ff861bd55f4dc46f25f5f6abfca15f}
2009-05-17 18:35:27 +02:00
protects this file from beeing double included
2009-05-16 14:10:42 +02:00
\index { lc7981.h@{ lc7981.h} !LCD\_ \- CRTL\_ \- DDR@{ LCD\_ \- CRTL\_ \- DDR} }
\index { LCD\_ \- CRTL\_ \- DDR@{ LCD\_ \- CRTL\_ \- DDR} !lc7981.h@{ lc7981.h} }
\subsubsection { \setlength { \rightskip } { 0pt plus 5cm} \# define LCD\_ \- CRTL\_ \- DDR~DDRC} \label { lc7981_ 8h_ 4b6c8400da9a1ca3d4d83f3ef1f9c34a}
2009-05-17 18:35:27 +02:00
Data-Direction-Register for the control signals.
2009-05-16 14:10:42 +02:00
\index { lc7981.h@{ lc7981.h} !LCD\_ \- CTRL@{ LCD\_ \- CTRL} }
\index { LCD\_ \- CTRL@{ LCD\_ \- CTRL} !lc7981.h@{ lc7981.h} }
\subsubsection { \setlength { \rightskip } { 0pt plus 5cm} \# define LCD\_ \- CTRL~PORTC} \label { lc7981_ 8h_ 8e945df7ca614325cafa08258e82a63c}
2009-05-17 18:35:27 +02:00
Port used for control signals.
2009-05-16 14:10:42 +02:00
\index { lc7981.h@{ lc7981.h} !LCD\_ \- DATA@{ LCD\_ \- DATA} }
\index { LCD\_ \- DATA@{ LCD\_ \- DATA} !lc7981.h@{ lc7981.h} }
\subsubsection { \setlength { \rightskip } { 0pt plus 5cm} \# define LCD\_ \- DATA~PORTD} \label { lc7981_ 8h_ 25e9d818788f36ed74d7c4579f87f2a6}
2009-05-17 18:35:27 +02:00
Port used for data.
2009-05-16 14:10:42 +02:00
\index { lc7981.h@{ lc7981.h} !LCD\_ \- DATA\_ \- DDR@{ LCD\_ \- DATA\_ \- DDR} }
\index { LCD\_ \- DATA\_ \- DDR@{ LCD\_ \- DATA\_ \- DDR} !lc7981.h@{ lc7981.h} }
\subsubsection { \setlength { \rightskip } { 0pt plus 5cm} \# define LCD\_ \- DATA\_ \- DDR~DDRD} \label { lc7981_ 8h_ 0c114e723aa4c162c415fb6d4d963dd7}
2009-05-17 18:35:27 +02:00
Data-Direction-Register for Data.
2009-05-16 14:10:42 +02:00
\index { lc7981.h@{ lc7981.h} !LCD\_ \- EN@{ LCD\_ \- EN} }
\index { LCD\_ \- EN@{ LCD\_ \- EN} !lc7981.h@{ lc7981.h} }
\subsubsection { \setlength { \rightskip } { 0pt plus 5cm} \# define LCD\_ \- EN~PC0} \label { lc7981_ 8h_ 1640ffbc0d8ec0f7edb04a2b93918072}
2009-05-17 18:35:27 +02:00
Strobe Pin.
2009-05-16 14:10:42 +02:00
\index { lc7981.h@{ lc7981.h} !lcd\_ \- en\_ \- high@{ lcd\_ \- en\_ \- high} }
\index { lcd\_ \- en\_ \- high@{ lcd\_ \- en\_ \- high} !lc7981.h@{ lc7981.h} }
\subsubsection { \setlength { \rightskip } { 0pt plus 5cm} \# define lcd\_ \- en\_ \- high()~(LCD\_ \- CTRL $ | $ = (1 $ < $ $ < $ LCD\_ \- EN))} \label { lc7981_ 8h_ e14be306d3620577abc8613d40401b04}
2009-05-17 18:35:27 +02:00
Set the strobe pin high.
2009-05-16 14:10:42 +02:00
\index { lc7981.h@{ lc7981.h} !lcd\_ \- en\_ \- low@{ lcd\_ \- en\_ \- low} }
\index { lcd\_ \- en\_ \- low@{ lcd\_ \- en\_ \- low} !lc7981.h@{ lc7981.h} }
\subsubsection { \setlength { \rightskip } { 0pt plus 5cm} \# define lcd\_ \- en\_ \- low()~(LCD\_ \- CTRL \& = $ \sim $ (1 $ < $ $ < $ LCD\_ \- EN))} \label { lc7981_ 8h_ d8dcdb36a9410fd96b2c936b7c9355dd}
2009-05-17 18:35:27 +02:00
Set the strobe pin low.
2009-05-16 14:10:42 +02:00
\index { lc7981.h@{ lc7981.h} !LCD\_ \- GRAPHIC@{ LCD\_ \- GRAPHIC} }
\index { LCD\_ \- GRAPHIC@{ LCD\_ \- GRAPHIC} !lc7981.h@{ lc7981.h} }
\subsubsection { \setlength { \rightskip } { 0pt plus 5cm} \# define LCD\_ \- GRAPHIC~1} \label { lc7981_ 8h_ dfaedf8da8e73d39a98d709b519a3117}
2009-05-17 18:35:27 +02:00
Constant for graphic mode.
2009-05-16 14:10:42 +02:00
\index { lc7981.h@{ lc7981.h} !LCD\_ \- GRAPHIC\_ \- HEIGHT@{ LCD\_ \- GRAPHIC\_ \- HEIGHT} }
\index { LCD\_ \- GRAPHIC\_ \- HEIGHT@{ LCD\_ \- GRAPHIC\_ \- HEIGHT} !lc7981.h@{ lc7981.h} }
\subsubsection { \setlength { \rightskip } { 0pt plus 5cm} \# define LCD\_ \- GRAPHIC\_ \- HEIGHT~80} \label { lc7981_ 8h_ 70265c4f840ef78872243e91c923af2f}
2009-05-17 18:35:27 +02:00
Vertical display size in pixels.
2009-05-16 14:10:42 +02:00
\index { lc7981.h@{ lc7981.h} !LCD\_ \- GRAPHIC\_ \- WIDTH@{ LCD\_ \- GRAPHIC\_ \- WIDTH} }
\index { LCD\_ \- GRAPHIC\_ \- WIDTH@{ LCD\_ \- GRAPHIC\_ \- WIDTH} !lc7981.h@{ lc7981.h} }
\subsubsection { \setlength { \rightskip } { 0pt plus 5cm} \# define LCD\_ \- GRAPHIC\_ \- WIDTH~160} \label { lc7981_ 8h_ 51e83be6f6929f2a29d5467cd937dfc6}
2009-05-17 18:35:27 +02:00
Horizontal display size in pixels.
2009-05-16 14:10:42 +02:00
\index { lc7981.h@{ lc7981.h} !LCD\_ \- RS@{ LCD\_ \- RS} }
\index { LCD\_ \- RS@{ LCD\_ \- RS} !lc7981.h@{ lc7981.h} }
\subsubsection { \setlength { \rightskip } { 0pt plus 5cm} \# define LCD\_ \- RS~PC4} \label { lc7981_ 8h_ 4781e073871c6f27f89b9463ad3a4ed1}
2009-05-17 18:35:27 +02:00
Register-Select Pin of the Display.
2009-05-16 14:10:42 +02:00
\index { lc7981.h@{ lc7981.h} !lcd\_ \- rs\_ \- high@{ lcd\_ \- rs\_ \- high} }
\index { lcd\_ \- rs\_ \- high@{ lcd\_ \- rs\_ \- high} !lc7981.h@{ lc7981.h} }
\subsubsection { \setlength { \rightskip } { 0pt plus 5cm} \# define lcd\_ \- rs\_ \- high()~(LCD\_ \- CTRL $ | $ = (1 $ < $ $ < $ LCD\_ \- RS))} \label { lc7981_ 8h_ 795b48274d3f80bc744a707b67fd93e9}
2009-05-17 18:35:27 +02:00
Set the Register-Select pin high.
2009-05-16 14:10:42 +02:00
\index { lc7981.h@{ lc7981.h} !lcd\_ \- rs\_ \- low@{ lcd\_ \- rs\_ \- low} }
\index { lcd\_ \- rs\_ \- low@{ lcd\_ \- rs\_ \- low} !lc7981.h@{ lc7981.h} }
\subsubsection { \setlength { \rightskip } { 0pt plus 5cm} \# define lcd\_ \- rs\_ \- low()~(LCD\_ \- CTRL \& = $ \sim $ (1 $ < $ $ < $ LCD\_ \- RS))} \label { lc7981_ 8h_ 6edb13d59460246fb4cc32ada1c9f4a8}
2009-05-17 18:35:27 +02:00
Set the Register-Select pin low.
2009-05-16 14:10:42 +02:00
\index { lc7981.h@{ lc7981.h} !LCD\_ \- RW@{ LCD\_ \- RW} }
\index { LCD\_ \- RW@{ LCD\_ \- RW} !lc7981.h@{ lc7981.h} }
\subsubsection { \setlength { \rightskip } { 0pt plus 5cm} \# define LCD\_ \- RW~PC2} \label { lc7981_ 8h_ 26089a10ddd59a0dc7283c19ccc02533}
2009-05-17 18:35:27 +02:00
Read-Write-select Pin.
2009-05-16 14:10:42 +02:00
\index { lc7981.h@{ lc7981.h} !lcd\_ \- rw\_ \- high@{ lcd\_ \- rw\_ \- high} }
\index { lcd\_ \- rw\_ \- high@{ lcd\_ \- rw\_ \- high} !lc7981.h@{ lc7981.h} }
\subsubsection { \setlength { \rightskip } { 0pt plus 5cm} \# define lcd\_ \- rw\_ \- high()~(LCD\_ \- CTRL $ | $ = (1 $ < $ $ < $ LCD\_ \- RW))} \label { lc7981_ 8h_ d0ce3cd9b481370ad4de36eff08440c8}
2009-05-17 18:35:27 +02:00
Set the Read-Write-Select pin high.
2009-05-16 14:10:42 +02:00
\index { lc7981.h@{ lc7981.h} !lcd\_ \- rw\_ \- low@{ lcd\_ \- rw\_ \- low} }
\index { lcd\_ \- rw\_ \- low@{ lcd\_ \- rw\_ \- low} !lc7981.h@{ lc7981.h} }
\subsubsection { \setlength { \rightskip } { 0pt plus 5cm} \# define lcd\_ \- rw\_ \- low()~(LCD\_ \- CTRL \& = $ \sim $ (1 $ < $ $ < $ LCD\_ \- RW))} \label { lc7981_ 8h_ 7f5ebe0ca71b1298a7d3423850cc82b1}
2009-05-17 18:35:27 +02:00
Set the Register-Select pin low.
2009-05-16 14:10:42 +02:00
\index { lc7981.h@{ lc7981.h} !LCD\_ \- TEXT@{ LCD\_ \- TEXT} }
\index { LCD\_ \- TEXT@{ LCD\_ \- TEXT} !lc7981.h@{ lc7981.h} }
\subsubsection { \setlength { \rightskip } { 0pt plus 5cm} \# define LCD\_ \- TEXT~0} \label { lc7981_ 8h_ 90a69d37f5c80f3ded970acf2dacf4c0}
2009-05-17 18:35:27 +02:00
Constant for text mode.
2009-05-16 14:10:42 +02:00
\index { lc7981.h@{ lc7981.h} !LCD\_ \- TEXT\_ \- COLUMNS@{ LCD\_ \- TEXT\_ \- COLUMNS} }
\index { LCD\_ \- TEXT\_ \- COLUMNS@{ LCD\_ \- TEXT\_ \- COLUMNS} !lc7981.h@{ lc7981.h} }
\subsubsection { \setlength { \rightskip } { 0pt plus 5cm} \# define LCD\_ \- TEXT\_ \- COLUMNS~26} \label { lc7981_ 8h_ 82f0a630f3c41b5233f2ceb07c7dd736}
2009-05-17 18:35:27 +02:00
Number of columns in text mode.
2009-05-16 14:10:42 +02:00
\index { lc7981.h@{ lc7981.h} !LCD\_ \- TEXT\_ \- LINES@{ LCD\_ \- TEXT\_ \- LINES} }
\index { LCD\_ \- TEXT\_ \- LINES@{ LCD\_ \- TEXT\_ \- LINES} !lc7981.h@{ lc7981.h} }
\subsubsection { \setlength { \rightskip } { 0pt plus 5cm} \# define LCD\_ \- TEXT\_ \- LINES~10} \label { lc7981_ 8h_ 720ef60606ac38ca3a5ab96a9c2b8168}
2009-05-17 18:35:27 +02:00
Number of lines in text mode.
2009-05-16 14:10:42 +02:00
\index { lc7981.h@{ lc7981.h} !PIXEL\_ \- OFF@{ PIXEL\_ \- OFF} }
\index { PIXEL\_ \- OFF@{ PIXEL\_ \- OFF} !lc7981.h@{ lc7981.h} }
\subsubsection { \setlength { \rightskip } { 0pt plus 5cm} \# define PIXEL\_ \- OFF~0} \label { lc7981_ 8h_ cda2f1b1cf6310700d0d91643c40e068}
2009-05-17 18:35:27 +02:00
see lcd\_ \- plot\_ \- pixel
2009-05-16 14:10:42 +02:00
\index { lc7981.h@{ lc7981.h} !PIXEL\_ \- ON@{ PIXEL\_ \- ON} }
\index { PIXEL\_ \- ON@{ PIXEL\_ \- ON} !lc7981.h@{ lc7981.h} }
\subsubsection { \setlength { \rightskip } { 0pt plus 5cm} \# define PIXEL\_ \- ON~1} \label { lc7981_ 8h_ eb2d212a26da4a5a4d3231b2773023e5}
2009-05-17 18:35:27 +02:00
see lcd\_ \- plot\_ \- pixel
2009-05-16 14:10:42 +02:00
\subsection { Function Documentation}
\index { lc7981.h@{ lc7981.h} !lcd\_ \- clear@{ lcd\_ \- clear} }
\index { lcd\_ \- clear@{ lcd\_ \- clear} !lc7981.h@{ lc7981.h} }
\subsubsection { \setlength { \rightskip } { 0pt plus 5cm} void lcd\_ \- clear ()\hspace { 0.3cm} { \tt [inline]} } \label { lc7981_ 8h_ 35c08b1fa742e650f4873939707b893b}
Clears the display by setting the whole memory to 0.
\index { lc7981.h@{ lc7981.h} !lcd\_ \- gotoxy@{ lcd\_ \- gotoxy} }
\index { lcd\_ \- gotoxy@{ lcd\_ \- gotoxy} !lc7981.h@{ lc7981.h} }
\subsubsection { \setlength { \rightskip } { 0pt plus 5cm} void lcd\_ \- gotoxy (uint8\_ \- t { \em x} , \/ uint8\_ \- t { \em y} )\hspace { 0.3cm} { \tt [inline]} } \label { lc7981_ 8h_ dbf47a5efdf02367ded1ebf8f9edb5fe}
Set the display cursor to a specific location.
Right now this does only work in text mode, since there's no need for it now in graphics mode. \par
If the x and y values are to big, the function does nothing.
\begin { Desc}
\item [Parameters:]
\begin { description}
\item [{\em x}] the horizontal cursorposition (starts at 0) \item [{\em y}] the vertical cursorposition (starts at 0) \end { description}
\end { Desc}
\index { lc7981.h@{ lc7981.h} !lcd\_ \- init@{ lcd\_ \- init} }
\index { lcd\_ \- init@{ lcd\_ \- init} !lc7981.h@{ lc7981.h} }
\subsubsection { \setlength { \rightskip } { 0pt plus 5cm} void lcd\_ \- init (uint8\_ \- t { \em mode} )} \label { lc7981_ 8h_ 9b18aca098d68e55bd7dd4b83f4f36e9}
lcd\_ \- init set the to default values.
\begin { Desc}
\item [Parameters:]
\begin { description}
\item [{\em mode}] LCD\_ \- TEXT for text mode and LCD\_ \- GRAPHIC for graphic mode \end { description}
\end { Desc}
\index { lc7981.h@{ lc7981.h} !lcd\_ \- plot\_ \- bitmap@{ lcd\_ \- plot\_ \- bitmap} }
\index { lcd\_ \- plot\_ \- bitmap@{ lcd\_ \- plot\_ \- bitmap} !lc7981.h@{ lc7981.h} }
2009-05-17 18:02:52 +02:00
\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}
2009-05-16 14:10:42 +02:00
2009-05-16 16:44:24 +02:00
This function will plot a bitmap with the upper left corner to the given coordinates.
2009-05-17 18:02:52 +02:00
\par
If the bitmap doesn't fit on the display at this location, nothing is drawn at all.\par
Unset pixels are treated as transparent \par
This function is by far the most tricky piece of code in this project,\par
don't worry if you don't understand it at first sight. \par
And if you know a better way to do this, tell me.\par
2009-05-17 18:35:27 +02:00
\begin { Desc}
\item [Parameters:]
\begin { description}
\item [{\em x}] horizontal position of the bitmap \item [{\em y}] vertical position of the bitmap \item [{\em bitmap}] pointer to the bitmap in pgmspace \item [{\em w}] width of the bitmap \item [{\em h}] height of the bitmap\end { description}
\end { Desc}
2009-05-17 18:02:52 +02:00
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} }
2009-05-16 14:10:42 +02:00
\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}
set or unset a pixel at the specified location
\begin { Desc}
\item [Parameters:]
\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.h@{ lc7981.h} !lcd\_ \- read\_ \- byte@{ lcd\_ \- read\_ \- byte} }
\index { lcd\_ \- read\_ \- byte@{ lcd\_ \- read\_ \- byte} !lc7981.h@{ lc7981.h} }
\subsubsection { \setlength { \rightskip } { 0pt plus 5cm} uint8\_ \- t lcd\_ \- read\_ \- byte ()\hspace { 0.3cm} { \tt [inline]} } \label { lc7981_ 8h_ 6334333537ad1d0bd51cba1e80f32e74}
Reads a byte from the display memory.
lcd\_ \- gotoxy can be used to set the location. Important : lcd\_ \- gotoxy doesn't work in graphics mode yet.
\begin { Desc}
\item [Returns:] the byte which has been read \end { Desc}
\begin { Desc}
\item [See also:] \doxyref { lcd\_ \- gotoxy} { p.} { lc7981_ 8h_ dbf47a5efdf02367ded1ebf8f9edb5fe} \end { Desc}
\index { lc7981.h@{ lc7981.h} !lcd\_ \- strobe@{ lcd\_ \- strobe} }
\index { lcd\_ \- strobe@{ lcd\_ \- strobe} !lc7981.h@{ lc7981.h} }
\subsubsection { \setlength { \rightskip } { 0pt plus 5cm} void lcd\_ \- strobe ()\hspace { 0.3cm} { \tt [inline]} } \label { lc7981_ 8h_ b4f286d6a313df7a5f692e0b4a9509ad}
Generates the strobe signal for writing data.
This function is meant for internal usage only. \index { lc7981.h@{ lc7981.h} !lcd\_ \- write\_ \- command@{ lcd\_ \- write\_ \- command} }
\index { lcd\_ \- write\_ \- command@{ lcd\_ \- write\_ \- command} !lc7981.h@{ lc7981.h} }
\subsubsection { \setlength { \rightskip } { 0pt plus 5cm} void lcd\_ \- write\_ \- command (uint8\_ \- t { \em cmd} , \/ uint8\_ \- t { \em data} )\hspace { 0.3cm} { \tt [inline]} } \label { lc7981_ 8h_ b69146a9179fc5b5deef3fc61cf0208c}
Writes a command and a data byte to the lcd.
\begin { Desc}
\item [Parameters:]
\begin { description}
\item [{\em cmd}] the command byte \item [{\em data}] the data that is going to be written after the command \end { description}
\end { Desc}
\index { lc7981.h@{ lc7981.h} !lcd\_ \- write\_ \- text@{ lcd\_ \- write\_ \- text} }
\index { lcd\_ \- write\_ \- text@{ lcd\_ \- write\_ \- text} !lc7981.h@{ lc7981.h} }
\subsubsection { \setlength { \rightskip } { 0pt plus 5cm} void lcd\_ \- write\_ \- text (char $ \ast $ { \em txt} )} \label { lc7981_ 8h_ 30251238a49999658455fdb0233757fb}