Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

# glcd.h

Go to the documentation of this file.

    00001 /*! \file glcd.h \brief Graphic LCD API functions. */
    00002 //*****************************************************************************
    00003 //
    00004 // File Name    : 'glcd.h'
    00005 // Title        : Graphic LCD API functions
    00006 // Author       : Pascal Stang - Copyright (C) 2002
    00007 // Date         : 5/30/2002
    00008 // Revised      : 5/30/2002
    00009 // Version      : 0.5
    00010 // Target MCU   : Atmel AVR
    00011 // Editor Tabs  : 4
    00012 //
    00013 // NOTE: This code is currently below version 1.0, and therefore is considered
    00014 // to be lacking in some functionality or documentation, or may not be fully
    00015 // tested.  Nonetheless, you can expect most functions to work.
    00016 //
    00017 /// \ingroup driver_hw
    00018 /// \defgroup glcd Graphic LCD API (application programmer's interface) (glcd.c)
    00019 /// \code #include "glcd.h" \endcode
    00020 /// \par Overview
    00021 ///     This library (or API) allows you to draw dots, lines, boxes, circles,
    00022 /// and text on most monochrome graphic LCDs.  An easily expandable font file
    00023 /// (5x7-pixel characters) is provided for all basic ASCII characters
    00024 /// (0x20-0x7F hex, 32-127 decimal).  An expandable graphic font file is
    00025 /// provided for defining specialty characters or custom icons.  Because this
    00026 /// library is designed to work with many different kinds of LCDs, it needs a
    00027 /// graphic LCD driver such as ks0108.c to enable it to talk to the LCD.
    00028 ///
    00029 /// \note For full text-output functionality, you may wish to use the rprintf
    00030 /// functions along with this driver.
    00031 //
    00032 // This code is distributed under the GNU Public License
    00033 //      which can be found at http://www.gnu.org/licenses/gpl.txt
    00034 //
    00035 //*****************************************************************************
    00036
    00037 #ifndef GLCD_H
    00038 #define GLCD_H
    00039
    00040 #ifndef WIN32
    00041 // AVR specific includes
    00042     #include <avr/io.h>
    00043 #endif
    00044
    00045 #include "global.h"
    00046
    00047 #define LINE1       0
    00048 #define LINE2       1
    00049 #define LINE3       2
    00050 #define LINE4       3
    00051 #define LINE5       4
    00052 #define LINE6       5
    00053 #define LINE7       6
    00054 #define LINE8       7
    00055
    00056 #define ON          1
    00057 #define OFF         0
    00058
    00059 // API-level interface commands
    00060 // ***** Public Functions *****
    00061
    00062 //! set a dot on the display (x is horiz 0:127, y is vert 0:63)
    00063 void glcdSetDot(u08 x, u08 y);
    00064
    00065 //! clear a dot on the display (x is horiz 0:127, y is vert 0:63)
    00066 void glcdClearDot(u08 x, u08 y);
    00067
    00068 //! draw line
    00069 void glcdLine(u08 x1, u08 y1, u08 x2, u08 y2);
    00070
    00071 //! draw rectangle (coords????)
    00072 void glcdRectangle(u08 x, u08 y, u08 a, u08 b);
    00073
    00074 //! draw circle of <radius> at <xcenter,ycenter>
    00075 void glcdCircle(u08 xcenter, u08 ycenter, u08 radius);
    00076
    00077 //! write a standard ascii charater (values 20-127)
    00078 // to the display at current position
    00079 void glcdWriteChar(unsigned char c);
    00080
    00081 //! write a special graphic character/icon
    00082 // to the display at current position
    00083 void glcdWriteCharGr(u08 grCharIndex);
    00084
    00085 // ***** Private Functions ***** (or depricated)
    00086 void glcdPutStr(u08 *data);
    00087
    00088 #endif