graphlcd-base/glcddrivers/sed1330.h
author root@rika
Wed, 06 Feb 2008 17:37:50 +0000
changeset 5 37602e25a04a
parent 4 df6a40031aa5
permissions -rw-r--r--
added picctl code
     1 /*
     2  * GraphLCD driver library
     3  *
     4  * sed1330.h  -  SED1330 driver class
     5  *
     6  * based on: hd61830.c
     7  *  (c) 2001-2004 Carsten Siebholz <c.siebholz AT t-online.de>
     8  *
     9  * changes for Seiko-Epson displays: Mar 2004
    10  *  (c) 2004 Heinz Gressenberger <heinz.gressenberger AT stmk.gv.at>
    11  *
    12  * init sequence taken from Thomas Baumann's LCD-Test program
    13  *
    14  * This file is released under the GNU General Public License. Refer
    15  * to the COPYING file distributed with this package.
    16  *
    17  * (c) 2003 Roland Praml <praml.roland AT t-online.de>
    18  */
    19 
    20 #ifndef _GLCDDRIVERS_SED1330_H_
    21 #define _GLCDDRIVERS_SED1330_H_
    22 
    23 #include "driver.h"
    24 
    25 
    26 namespace GLCD
    27 {
    28 
    29 class cDriverConfig;
    30 class cParallelPort;
    31 
    32 class cDriverSED1330 : public cDriver
    33 {
    34 private:
    35     cParallelPort * port;
    36     unsigned char ** newLCD; // wanted state
    37     unsigned char ** oldLCD; // current state
    38     int refreshCounter;
    39     long timeForPortCmdInNs;
    40     cDriverConfig * config;
    41     cDriverConfig * oldConfig;
    42     bool useSleepInit;
    43 
    44     int oscillatorFrequency;
    45     int interface;
    46     unsigned char A0HI;
    47     unsigned char A0LO;
    48     unsigned char RDHI;
    49     unsigned char RDLO;
    50     unsigned char ENHI;
    51     unsigned char ENLO;
    52     unsigned char WRHI;
    53     unsigned char WRLO;
    54     unsigned char RWHI;
    55     unsigned char RWLO;
    56     unsigned char CSHI;
    57     unsigned char CSLO;
    58 
    59     int CheckSetup();
    60     int InitGraphic();
    61     void WriteCmd(unsigned char cmd);
    62     void WriteData(unsigned char data);
    63 
    64 public:
    65     cDriverSED1330(cDriverConfig * config);
    66     virtual ~cDriverSED1330();
    67 
    68     virtual int Init();
    69     virtual int DeInit();
    70 
    71     virtual void Clear();
    72     virtual void Set8Pixels(int x, int y, unsigned char data);
    73     virtual void Refresh(bool refreshAll = false);
    74 };
    75 
    76 } // end of namespace
    77 
    78 #endif