383 lines
20 KiB
TeX
383 lines
20 KiB
TeX
\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\_\-
|
|
\begin{CompactList}\small\item\em protects this file from beeing double included \item\end{CompactList}\item
|
|
\#define {\bf LCD\_\-CTRL}~PORTA
|
|
\begin{CompactList}\small\item\em Port used for control signals. \item\end{CompactList}\item
|
|
\#define {\bf LCD\_\-CRTL\_\-DDR}~DDRA
|
|
\begin{CompactList}\small\item\em Data-Direction-Register for the control signals. \item\end{CompactList}\item
|
|
\#define {\bf LCD\_\-RS}~PA4
|
|
\begin{CompactList}\small\item\em Register-Select Pin of the Display. \item\end{CompactList}\item
|
|
\#define {\bf LCD\_\-RW}~PA2
|
|
\begin{CompactList}\small\item\em Read-Write-select Pin. \item\end{CompactList}\item
|
|
\#define {\bf LCD\_\-EN}~PA0
|
|
\begin{CompactList}\small\item\em Strobe Pin. \item\end{CompactList}\item
|
|
\#define {\bf LCD\_\-DATA}~PORTD
|
|
\begin{CompactList}\small\item\em Port used for data. \item\end{CompactList}\item
|
|
\#define {\bf LCD\_\-DATA\_\-DDR}~DDRD
|
|
\begin{CompactList}\small\item\em Data-Direction-Register for Data. \item\end{CompactList}\item
|
|
\#define {\bf lcd\_\-rs\_\-high}()~(LCD\_\-CTRL $|$= (1 $<$$<$ LCD\_\-RS))
|
|
\begin{CompactList}\small\item\em Set the Register-Select pin high. \item\end{CompactList}\item
|
|
\#define {\bf lcd\_\-rs\_\-low}()~(LCD\_\-CTRL \&= $\sim$(1 $<$$<$ LCD\_\-RS))
|
|
\begin{CompactList}\small\item\em Set the Register-Select pin low. \item\end{CompactList}\item
|
|
\#define {\bf lcd\_\-rw\_\-high}()~(LCD\_\-CTRL $|$= (1 $<$$<$ LCD\_\-RW))
|
|
\begin{CompactList}\small\item\em Set the Read-Write-Select pin high. \item\end{CompactList}\item
|
|
\#define {\bf lcd\_\-rw\_\-low}()~(LCD\_\-CTRL \&= $\sim$(1 $<$$<$ LCD\_\-RW))
|
|
\begin{CompactList}\small\item\em Set the Register-Select pin low. \item\end{CompactList}\item
|
|
\#define {\bf lcd\_\-en\_\-high}()~(LCD\_\-CTRL $|$= (1 $<$$<$ LCD\_\-EN))
|
|
\begin{CompactList}\small\item\em Set the strobe pin high. \item\end{CompactList}\item
|
|
\#define {\bf lcd\_\-en\_\-low}()~(LCD\_\-CTRL \&= $\sim$(1 $<$$<$ LCD\_\-EN))
|
|
\begin{CompactList}\small\item\em Set the strobe pin low. \item\end{CompactList}\item
|
|
\#define {\bf LCD\_\-TEXT}~0
|
|
\begin{CompactList}\small\item\em Constant for text mode. \item\end{CompactList}\item
|
|
\#define {\bf LCD\_\-TEXT\_\-LINES}~10
|
|
\begin{CompactList}\small\item\em Number of lines in text mode. \item\end{CompactList}\item
|
|
\#define {\bf LCD\_\-TEXT\_\-COLUMNS}~26
|
|
\begin{CompactList}\small\item\em Number of columns in text mode. \item\end{CompactList}\item
|
|
\#define {\bf LCD\_\-GRAPHIC}~1
|
|
\begin{CompactList}\small\item\em Constant for graphic mode. \item\end{CompactList}\item
|
|
\#define {\bf LCD\_\-GRAPHIC\_\-WIDTH}~160
|
|
\begin{CompactList}\small\item\em Horizontal display size in pixels. \item\end{CompactList}\item
|
|
\#define {\bf LCD\_\-GRAPHIC\_\-HEIGHT}~80
|
|
\begin{CompactList}\small\item\em Vertical display size in pixels. \item\end{CompactList}\item
|
|
\#define {\bf PIXEL\_\-ON}~1
|
|
\begin{CompactList}\small\item\em see lcd\_\-plot\_\-pixel \item\end{CompactList}\item
|
|
\#define {\bf PIXEL\_\-OFF}~0
|
|
\begin{CompactList}\small\item\em see lcd\_\-plot\_\-pixel \item\end{CompactList}\end{CompactItemize}
|
|
\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)
|
|
\begin{CompactList}\small\item\em Outputs text in at the current cursor position. \item\end{CompactList}\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)
|
|
\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)
|
|
\begin{CompactList}\small\item\em Plots a single character in graphicmode. \item\end{CompactList}\item
|
|
void {\bf lcd\_\-plot\_\-text} (uint8\_\-t x\_\-off, uint8\_\-t y\_\-off, const char $\ast$text, uint8\_\-t fw, uint8\_\-t fh, const uint8\_\-t $\ast$font)
|
|
\begin{CompactList}\small\item\em Plots a text using lcd\_\-plot\_\-char. \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\_\-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}
|
|
|
|
|
|
protects this file from beeing double included
|
|
|
|
\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~DDRA}\label{lc7981_8h_4b6c8400da9a1ca3d4d83f3ef1f9c34a}
|
|
|
|
|
|
Data-Direction-Register for the control signals.
|
|
|
|
\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~PORTA}\label{lc7981_8h_8e945df7ca614325cafa08258e82a63c}
|
|
|
|
|
|
Port used for control signals.
|
|
|
|
\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}
|
|
|
|
|
|
Port used for data.
|
|
|
|
\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}
|
|
|
|
|
|
Data-Direction-Register for Data.
|
|
|
|
\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~PA0}\label{lc7981_8h_1640ffbc0d8ec0f7edb04a2b93918072}
|
|
|
|
|
|
Strobe Pin.
|
|
|
|
\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}
|
|
|
|
|
|
Set the strobe pin high.
|
|
|
|
\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}
|
|
|
|
|
|
Set the strobe pin low.
|
|
|
|
\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}
|
|
|
|
|
|
Constant for graphic mode.
|
|
|
|
\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}
|
|
|
|
|
|
Vertical display size in pixels.
|
|
|
|
\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}
|
|
|
|
|
|
Horizontal display size in pixels.
|
|
|
|
\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~PA4}\label{lc7981_8h_4781e073871c6f27f89b9463ad3a4ed1}
|
|
|
|
|
|
Register-Select Pin of the Display.
|
|
|
|
\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}
|
|
|
|
|
|
Set the Register-Select pin high.
|
|
|
|
\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}
|
|
|
|
|
|
Set the Register-Select pin low.
|
|
|
|
\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~PA2}\label{lc7981_8h_26089a10ddd59a0dc7283c19ccc02533}
|
|
|
|
|
|
Read-Write-select Pin.
|
|
|
|
\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}
|
|
|
|
|
|
Set the Read-Write-Select pin high.
|
|
|
|
\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}
|
|
|
|
|
|
Set the Register-Select pin low.
|
|
|
|
\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}
|
|
|
|
|
|
Constant for text mode.
|
|
|
|
\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}
|
|
|
|
|
|
Number of columns in text mode.
|
|
|
|
\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}
|
|
|
|
|
|
Number of lines in text mode.
|
|
|
|
\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}
|
|
|
|
|
|
see lcd\_\-plot\_\-pixel
|
|
|
|
\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}
|
|
|
|
|
|
see lcd\_\-plot\_\-pixel
|
|
|
|
|
|
|
|
\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}}
|
|
\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}
|
|
|
|
|
|
This function will plot a bitmap with the upper left corner to the given coordinates.
|
|
|
|
\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
|
|
|
|
|
|
\begin{Desc}
|
|
\item[Parameters:]
|
|
\begin{description}
|
|
\item[{\em x\_\-off}]horizontal position of the bitmap \item[{\em y\_\-off}]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}
|
|
This function is dedicated to Greta, one of the most important persons in my life so far.\par
|
|
\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}
|
|
|
|
|
|
Plots a single character in graphicmode.
|
|
|
|
Each character of the font is stored linewise. \par
|
|
This means for a 8x8 Pixel font the 8 bytes are needed. \par
|
|
The first byte is the first line and the last byte is the last line. \par
|
|
The next 8byte are the next character.\par
|
|
\par
|
|
If the position is too close to the display edge so it can't be displayed completely,\par
|
|
It won't be displayed at all.
|
|
|
|
\begin{Desc}
|
|
\item[Parameters:]
|
|
\begin{description}
|
|
\item[{\em x\_\-off}]horizontal position of the character \item[{\em y\_\-off}]vertical position of the character \item[{\em c}]the character or it's ascii code \item[{\em fw}]width of the font \item[{\em fh}]height of the font \item[{\em font}]pointer to the flash area where the font is stored \end{description}
|
|
\end{Desc}
|
|
\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}
|
|
|
|
|
|
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\_\-plot\_\-text@{lcd\_\-plot\_\-text}}
|
|
\index{lcd\_\-plot\_\-text@{lcd\_\-plot\_\-text}!lc7981.h@{lc7981.h}}
|
|
\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}, \/ uint8\_\-t {\em fw}, \/ uint8\_\-t {\em fh}, \/ const uint8\_\-t $\ast$ {\em font})}\label{lc7981_8h_324c97a9fc335bb59fb6f2f56d729dd5}
|
|
|
|
|
|
Plots a text using lcd\_\-plot\_\-char.
|
|
|
|
\begin{Desc}
|
|
\item[Parameters:]
|
|
\begin{description}
|
|
\item[{\em x\_\-off}]horizontal position of the character \item[{\em y\_\-off}]vertical position of the character \item[{\em text}]the text that is plotted \item[{\em fw}]width of the font \item[{\em fh}]height of the font \item[{\em font}]pointer to the flash area where the font is stored\end{description}
|
|
\end{Desc}
|
|
\begin{Desc}
|
|
\item[See also:]\doxyref{lcd\_\-plot\_\-char}{p.}{lc7981_8h_9bbbc52f3cb24a861d11b08e1c14bca2} \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}
|
|
|
|
|
|
Outputs text in at the current cursor position.
|
|
|
|
If a $\backslash$n occurs in the last line of the display, all the other line will be 'scrolled' up. This function is textmode only. The the second line becomes the first, the third the second and so on ... \begin{Desc}
|
|
\item[Parameters:]
|
|
\begin{description}
|
|
\item[{\em txt}]the text \end{description}
|
|
\end{Desc}
|