diff --git a/doc/html/button_8h-source.html b/doc/html/button_8h-source.html index 3079414..0657b4f 100644 --- a/doc/html/button_8h-source.html +++ b/doc/html/button_8h-source.html @@ -14,7 +14,7 @@

button.h

Go to the documentation of this file.
00001 #include <avr/pgmspace.h>
 00002 
-00003 const uint8_t bitmap[] PROGMEM  = {
+00003 const uint8_t bitmap[] PROGMEM  = {
 00004                 0x00,0x00,0x00,0x00,
 00005                 0x80,0xFF,0xFF,0x01,
 00006                 0x60,0x00,0x00,0x06,
@@ -49,7 +49,7 @@
 00035                 0x00,0x00,0x00,0x00};
 00036 
 
-
Generated on Sun May 17 18:34:49 2009 for glcd by  +
Generated on Tue May 19 21:40:21 2009 for glcd by  doxygen 1.5.5
diff --git a/doc/html/button_8h.html b/doc/html/button_8h.html index d379c1d..8511a0a 100644 --- a/doc/html/button_8h.html +++ b/doc/html/button_8h.html @@ -40,7 +40,7 @@

-


Generated on Sun May 17 18:34:49 2009 for glcd by  +
Generated on Tue May 19 21:40:21 2009 for glcd by  doxygen 1.5.5
diff --git a/doc/html/files.html b/doc/html/files.html index 58b8052..02774c6 100644 --- a/doc/html/files.html +++ b/doc/html/files.html @@ -21,13 +21,15 @@

File List

Here is a list of all files with brief descriptions: + +
12x16_horizontal_LSB_1.h [code]
8x8_horizontal_LSB_1.h [code]
button.h [code]
main.c
include/lc7981.c
include/lc7981.h [code]
-
Generated on Sun May 17 18:34:49 2009 for glcd by  +
Generated on Tue May 19 21:40:21 2009 for glcd by  doxygen 1.5.5
diff --git a/doc/html/globals.html b/doc/html/globals.html index 0438b85..5d5ec6e 100644 --- a/doc/html/globals.html +++ b/doc/html/globals.html @@ -78,9 +78,14 @@ Here is a list of all functions, variables, defines, enums, and typedefs with li
  • lcd_plot_bitmap() : lc7981.c , lc7981.h +
  • lcd_plot_char() +: lc7981.c +, lc7981.h
  • lcd_plot_pixel() -: lc7981.h -, lc7981.c +: lc7981.c +, lc7981.h +
  • lcd_plot_text() +: lc7981.c
  • lcd_read_byte() : lc7981.c , lc7981.h @@ -97,8 +102,8 @@ Here is a list of all functions, variables, defines, enums, and typedefs with li
  • lcd_rw_low : lc7981.h
  • lcd_strobe() -: lc7981.c -, lc7981.h +: lc7981.h +, lc7981.c
  • LCD_TEXT : lc7981.h
  • LCD_TEXT_COLUMNS @@ -122,10 +127,12 @@ Here is a list of all functions, variables, defines, enums, and typedefs with li
  • PIXEL_ON : lc7981.h
  • PROGMEM -: button.h +: 8x8_horizontal_LSB_1.h +, 12x16_horizontal_LSB_1.h +, button.h -
    Generated on Sun May 17 18:34:49 2009 for glcd by  +
    Generated on Tue May 19 21:40:21 2009 for glcd by  doxygen 1.5.5
    diff --git a/doc/html/globals_defs.html b/doc/html/globals_defs.html index 7320a08..905cd11 100644 --- a/doc/html/globals_defs.html +++ b/doc/html/globals_defs.html @@ -77,7 +77,7 @@ : lc7981.h -
    Generated on Sun May 17 18:34:49 2009 for glcd by  +
    Generated on Tue May 19 21:40:21 2009 for glcd by  doxygen 1.5.5
    diff --git a/doc/html/globals_func.html b/doc/html/globals_func.html index f44c418..fb10ebc 100644 --- a/doc/html/globals_func.html +++ b/doc/html/globals_func.html @@ -43,18 +43,23 @@
  • lcd_plot_bitmap() : lc7981.h , lc7981.c +
  • lcd_plot_char() +: lc7981.c +, lc7981.h
  • lcd_plot_pixel() : lc7981.c , lc7981.h +
  • lcd_plot_text() +: lc7981.c
  • lcd_read_byte() -: lc7981.c -, lc7981.h +: lc7981.h +, lc7981.c
  • lcd_strobe() : lc7981.c , lc7981.h
  • lcd_write_command() -: lc7981.h -, lc7981.c +: lc7981.c +, lc7981.h
  • lcd_write_text() : lc7981.h , lc7981.c @@ -62,7 +67,7 @@ : main.c -
    Generated on Sun May 17 18:34:49 2009 for glcd by  +
    Generated on Tue May 19 21:40:21 2009 for glcd by  doxygen 1.5.5
    diff --git a/doc/html/globals_vars.html b/doc/html/globals_vars.html index 6be2827..96e4e4f 100644 --- a/doc/html/globals_vars.html +++ b/doc/html/globals_vars.html @@ -36,10 +36,12 @@
  • lcd_mode : lc7981.c
  • PROGMEM -: button.h +: 12x16_horizontal_LSB_1.h +, button.h +, 8x8_horizontal_LSB_1.h -
    Generated on Sun May 17 18:34:49 2009 for glcd by  +
    Generated on Tue May 19 21:40:21 2009 for glcd by  doxygen 1.5.5
    diff --git a/doc/html/index.html b/doc/html/index.html index 9ca2a82..3ace89b 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -17,7 +17,7 @@

    glcd Documentation

    0.1beta

    -
    Generated on Sun May 17 18:34:49 2009 for glcd by  +
    Generated on Tue May 19 21:40:21 2009 for glcd by  doxygen 1.5.5
    diff --git a/doc/html/lc7981_8c.html b/doc/html/lc7981_8c.html index 6a2b0e6..dd2caaa 100644 --- a/doc/html/lc7981_8c.html +++ b/doc/html/lc7981_8c.html @@ -44,6 +44,10 @@ void lcd_plot_bitmap (uint8_t x_off, uint8_t y_off, const uint8_t *bitmap, uint8_t w, uint8_t h)  This function will plot a bitmap with the upper left corner to the given coordinates.
    +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, const uint8_t *font) +

    Variables

    uint8_t lcd_mode @@ -177,7 +181,7 @@ lcd_init set the to default values. ) - + [inline] @@ -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.
    Even though I can't remember her actual name.
    + +

    + +

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    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 
    ) [inline]
    +
    +
    + +

    +

    @@ -249,6 +306,47 @@ set or unset a pixel at the specified location + +

    + +

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    void lcd_plot_text (uint8_t  x_off,
    uint8_t  y_off,
    const char *  text,
    const uint8_t *  font 
    )
    +
    +
    + +

    +

    @@ -389,7 +487,7 @@ Currently used mode, can be text or graphic.

    -


    Generated on Sun May 17 18:34:49 2009 for glcd by  +
    Generated on Tue May 19 21:40:21 2009 for glcd by  doxygen 1.5.5
    diff --git a/doc/html/lc7981_8h-source.html b/doc/html/lc7981_8h-source.html index c15c5a5..e30343d 100644 --- a/doc/html/lc7981_8h-source.html +++ b/doc/html/lc7981_8h-source.html @@ -33,64 +33,73 @@ 00019 * You should have received a copy of the GNU General Public License 00020 * along with Sebastians AVR Library. If not, see <http://www.gnu.org/licenses/>. 00021 * -00022 */ -00023 -00024 #ifndef LC7981_H_ -00025 #define LC7981_H_ LC7981_H_ -00026 -00027 #include <avr/io.h> -00028 #include <util/delay.h> -00029 #include <avr/pgmspace.h> +00022 * +00023 * 'Do the thing you want to do and let your spirits guide you through. +00024 * Live a life, worth being remembered.' +00025 * -- Remembered - Firewind -- +00026 */ +00027 +00028 +00029 00030 -00031 #define LCD_CTRL PORTC -00032 #define LCD_CRTL_DDR DDRC -00033 #define LCD_RS PC4 -00034 #define LCD_RW PC2 -00035 #define LCD_EN PC0 -00036 -00037 -00038 -00039 #define LCD_DATA PORTD -00040 #define LCD_DATA_DDR DDRD -00041 -00042 // Macros for (un)setting the control pins -00043 #define lcd_rs_high() (LCD_CTRL |= (1 << LCD_RS)) -00044 #define lcd_rs_low() (LCD_CTRL &= ~(1 << LCD_RS)) -00045 -00046 #define lcd_rw_high() (LCD_CTRL |= (1 << LCD_RW)) -00047 #define lcd_rw_low() (LCD_CTRL &= ~(1 << LCD_RW)) +00031 #ifndef LC7981_H_ +00032 #define LC7981_H_ LC7981_H_ +00033 +00034 #include <avr/io.h> +00035 #include <util/delay.h> +00036 #include <avr/pgmspace.h> +00037 +00038 #define LCD_CTRL PORTC +00039 #define LCD_CRTL_DDR DDRC +00040 #define LCD_RS PC4 +00041 #define LCD_RW PC2 +00042 #define LCD_EN PC0 +00043 +00044 +00045 +00046 #define LCD_DATA PORTD +00047 #define LCD_DATA_DDR DDRD 00048 -00049 #define lcd_en_high() (LCD_CTRL |= (1 << LCD_EN)) -00050 #define lcd_en_low() (LCD_CTRL &= ~(1 << LCD_EN)) -00051 +00049 // Macros for (un)setting the control pins +00050 #define lcd_rs_high() (LCD_CTRL |= (1 << LCD_RS)) +00051 #define lcd_rs_low() (LCD_CTRL &= ~(1 << LCD_RS)) 00052 -00053 #define LCD_TEXT 0 -00054 #define LCD_TEXT_LINES 10 -00055 #define LCD_TEXT_COLUMNS 26 -00056 -00057 #define LCD_GRAPHIC 1 -00058 #define LCD_GRAPHIC_WIDTH 160 -00059 #define LCD_GRAPHIC_HEIGHT 80 -00060 #define PIXEL_ON 1 -00061 #define PIXEL_OFF 0 -00062 -00063 void lcd_init(uint8_t mode); -00064 inline void lcd_clear(); -00065 -00066 void lcd_write_text(char *txt); -00067 inline void lcd_gotoxy(uint8_t x, uint8_t y); -00068 -00069 void lcd_plot_pixel(uint8_t x, uint8_t y, uint8_t set); -00070 void lcd_plot_bitmap(uint8_t x, uint8_t y, const uint8_t *bitmap, uint8_t w, uint8_t h); -00071 +00053 #define lcd_rw_high() (LCD_CTRL |= (1 << LCD_RW)) +00054 #define lcd_rw_low() (LCD_CTRL &= ~(1 << LCD_RW)) +00055 +00056 #define lcd_en_high() (LCD_CTRL |= (1 << LCD_EN)) +00057 #define lcd_en_low() (LCD_CTRL &= ~(1 << LCD_EN)) +00058 +00059 +00060 #define LCD_TEXT 0 +00061 #define LCD_TEXT_LINES 10 +00062 #define LCD_TEXT_COLUMNS 26 +00063 +00064 #define LCD_GRAPHIC 1 +00065 #define LCD_GRAPHIC_WIDTH 160 +00066 #define LCD_GRAPHIC_HEIGHT 80 +00067 #define PIXEL_ON 1 +00068 #define PIXEL_OFF 0 +00069 +00070 void lcd_init(uint8_t mode); +00071 inline void lcd_clear(); 00072 -00073 inline void lcd_strobe(); -00074 inline void lcd_write_command(uint8_t cmd, uint8_t data); -00075 inline uint8_t lcd_read_byte(); -00076 -00077 #endif /* LC7981_H_ */ +00073 void lcd_write_text(char *txt); +00074 inline void lcd_gotoxy(uint8_t x, uint8_t y); +00075 +00076 void lcd_plot_pixel(uint8_t x, uint8_t y, uint8_t set); +00077 void lcd_plot_bitmap(uint8_t x, uint8_t y, const uint8_t *bitmap, uint8_t w, uint8_t h); +00078 +00079 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); +00080 +00081 +00082 inline void lcd_strobe(); +00083 inline void lcd_write_command(uint8_t cmd, uint8_t data); +00084 inline uint8_t lcd_read_byte(); +00085 +00086 #endif /* LC7981_H_ */ -
    Generated on Sun May 17 18:34:49 2009 for glcd by  +
    Generated on Tue May 19 21:40:21 2009 for glcd by  doxygen 1.5.5
    diff --git a/doc/html/lc7981_8h.html b/doc/html/lc7981_8h.html index 632dc16..f2649af 100644 --- a/doc/html/lc7981_8h.html +++ b/doc/html/lc7981_8h.html @@ -106,6 +106,8 @@ void lcd_plot_bitmap (uint8_t x, uint8_t y, const uint8_t *bitmap, uint8_t w, uint8_t h)  This function will plot a bitmap with the upper left corner to the given coordinates.
    +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_strobe ()  Generates the strobe signal for writing data.
    @@ -646,7 +648,7 @@ lcd_init set the to default values. ) - + [inline] @@ -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.
    Even though I can't remember her actual name.
    + +

    + +

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    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 
    ) [inline]
    +
    +
    + +

    +

    @@ -823,7 +878,7 @@ Writes a command and a data byte to the lcd.

    -


    Generated on Sun May 17 18:34:49 2009 for glcd by  +
    Generated on Tue May 19 21:40:21 2009 for glcd by  doxygen 1.5.5
    diff --git a/doc/html/main_8c.html b/doc/html/main_8c.html index 4a64563..0b2dfda 100644 --- a/doc/html/main_8c.html +++ b/doc/html/main_8c.html @@ -18,6 +18,8 @@ #include <stdlib.h>
    #include "include/lc7981.h"
    #include "button.h"
    +#include "12x16_horizontal_LSB_1.h"
    +#include "8x8_horizontal_LSB_1.h"
    @@ -45,7 +47,7 @@

    -


    Generated on Sun May 17 18:34:49 2009 for glcd by  +
    Generated on Tue May 19 21:40:21 2009 for glcd by  doxygen 1.5.5
    diff --git a/doc/latex/doxygen.sty b/doc/latex/doxygen.sty index 5148526..55dcaea 100644 --- a/doc/latex/doxygen.sty +++ b/doc/latex/doxygen.sty @@ -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} diff --git a/doc/latex/files.tex b/doc/latex/files.tex index 046322b..44ba4a8 100644 --- a/doc/latex/files.tex +++ b/doc/latex/files.tex @@ -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}}{} diff --git a/doc/latex/lc7981_8c.tex b/doc/latex/lc7981_8c.tex index 35f1c22..f29a8d4 100644 --- a/doc/latex/lc7981_8c.tex +++ b/doc/latex/lc7981_8c.tex @@ -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} diff --git a/doc/latex/lc7981_8h.tex b/doc/latex/lc7981_8h.tex index e2de085..169da6d 100644 --- a/doc/latex/lc7981_8h.tex +++ b/doc/latex/lc7981_8h.tex @@ -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} diff --git a/doc/latex/main_8c.tex b/doc/latex/main_8c.tex index 6b715fa..1e81040 100644 --- a/doc/latex/main_8c.tex +++ b/doc/latex/main_8c.tex @@ -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 diff --git a/doc/latex/refman.tex b/doc/latex/refman.tex index 0a008a3..ed26eb1 100644 --- a/doc/latex/refman.tex +++ b/doc/latex/refman.tex @@ -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} diff --git a/include/lc7981.c b/include/lc7981.c index 6f7b5c8..3cfdb60 100644 --- a/include/lc7981.c +++ b/include/lc7981.c @@ -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) { + + + +} + + + diff --git a/include/lc7981.h b/include/lc7981.h index e626cd0..2a71429 100644 --- a/include/lc7981.h +++ b/include/lc7981.h @@ -19,8 +19,15 @@ * You should have received a copy of the GNU General Public License * along with Sebastians AVR Library. If not, see . * + * + * '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); diff --git a/main.c b/main.c index 9cc0329..73b5436 100644 --- a/main.c +++ b/main.c @@ -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(); */

    Functions