2009-05-16 14:10:42 +02:00
\section { include/lc7981.c File Reference}
\label { lc7981_ 8c} \index { include/lc7981.c@{ include/lc7981.c} }
{ \tt \# include \char `\" { } lc7981.h\char `\" { } } \par
\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\_ \- 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} \item
void { \bf lcd\_ \- strobe} ()
\begin { CompactList} \small \item \em Generates the strobe signal for writing data. \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\_ \- off, uint8\_ \- t y\_ \- off, 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} \end { CompactItemize}
2009-05-16 14:10:42 +02:00
\subsection * { Variables}
\begin { CompactItemize}
\item
uint8\_ \- t { \bf lcd\_ \- mode}
\begin { CompactList} \small \item \em Currently used mode, can be text or graphic. \item \end { CompactList} \item
uint8\_ \- t { \bf lcd\_ \- curline}
\begin { CompactList} \small \item \em Current line. Used for scrolling in text mode. \item \end { CompactList} \end { CompactItemize}
\subsection { Function Documentation}
\index { lc7981.c@{ lc7981.c} !lcd\_ \- clear@{ lcd\_ \- clear} }
\index { lcd\_ \- clear@{ lcd\_ \- clear} !lc7981.c@{ lc7981.c} }
\subsubsection { \setlength { \rightskip } { 0pt plus 5cm} void lcd\_ \- clear ()\hspace { 0.3cm} { \tt [inline]} } \label { lc7981_ 8c_ 35c08b1fa742e650f4873939707b893b}
Clears the display by setting the whole memory to 0.
\index { lc7981.c@{ lc7981.c} !lcd\_ \- gotoxy@{ lcd\_ \- gotoxy} }
\index { lcd\_ \- gotoxy@{ lcd\_ \- gotoxy} !lc7981.c@{ lc7981.c} }
\subsubsection { \setlength { \rightskip } { 0pt plus 5cm} void lcd\_ \- gotoxy (uint8\_ \- t { \em x} , \/ uint8\_ \- t { \em y} )\hspace { 0.3cm} { \tt [inline]} } \label { lc7981_ 8c_ 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.c@{ lc7981.c} !lcd\_ \- init@{ lcd\_ \- init} }
\index { lcd\_ \- init@{ lcd\_ \- init} !lc7981.c@{ lc7981.c} }
\subsubsection { \setlength { \rightskip } { 0pt plus 5cm} void lcd\_ \- init (uint8\_ \- t { \em mode} )} \label { lc7981_ 8c_ 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.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}
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.c@{ lc7981.c} !lcd\_ \- plot\_ \- pixel@{ lcd\_ \- plot\_ \- pixel} }
2009-05-16 14:10:42 +02:00
\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}
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.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}
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.c@{ lc7981.c} !lcd\_ \- strobe@{ lcd\_ \- strobe} }
\index { lcd\_ \- strobe@{ lcd\_ \- strobe} !lc7981.c@{ lc7981.c} }
\subsubsection { \setlength { \rightskip } { 0pt plus 5cm} void lcd\_ \- strobe ()\hspace { 0.3cm} { \tt [inline]} } \label { lc7981_ 8c_ b4f286d6a313df7a5f692e0b4a9509ad}
Generates the strobe signal for writing data.
This function is meant for internal usage only. \index { lc7981.c@{ lc7981.c} !lcd\_ \- write\_ \- command@{ lcd\_ \- write\_ \- command} }
\index { lcd\_ \- write\_ \- command@{ lcd\_ \- write\_ \- command} !lc7981.c@{ lc7981.c} }
\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_ 8c_ 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.c@{ lc7981.c} !lcd\_ \- write\_ \- text@{ lcd\_ \- write\_ \- text} }
\index { lcd\_ \- write\_ \- text@{ lcd\_ \- write\_ \- text} !lc7981.c@{ lc7981.c} }
\subsubsection { \setlength { \rightskip } { 0pt plus 5cm} void lcd\_ \- write\_ \- text (char $ \ast $ { \em txt} )} \label { lc7981_ 8c_ 30251238a49999658455fdb0233757fb}
\subsection { Variable Documentation}
\index { lc7981.c@{ lc7981.c} !lcd\_ \- curline@{ lcd\_ \- curline} }
\index { lcd\_ \- curline@{ lcd\_ \- curline} !lc7981.c@{ lc7981.c} }
\subsubsection { \setlength { \rightskip } { 0pt plus 5cm} uint8\_ \- t { \bf lcd\_ \- curline} } \label { lc7981_ 8c_ 76f8e26cf50274635b544f68752b2a0f}
Current line. Used for scrolling in text mode.
\index { lc7981.c@{ lc7981.c} !lcd\_ \- mode@{ lcd\_ \- mode} }
\index { lcd\_ \- mode@{ lcd\_ \- mode} !lc7981.c@{ lc7981.c} }
\subsubsection { \setlength { \rightskip } { 0pt plus 5cm} uint8\_ \- t { \bf lcd\_ \- mode} } \label { lc7981_ 8c_ a29c0577fe01129f48b5b21301d3ea49}
Currently used mode, can be text or graphic.