1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/graphlcd-base/glcddrivers/sed1330.h Wed Feb 06 17:32:55 2008 +0000
1.3 @@ -0,0 +1,78 @@
1.4 +/*
1.5 + * GraphLCD driver library
1.6 + *
1.7 + * sed1330.h - SED1330 driver class
1.8 + *
1.9 + * based on: hd61830.c
1.10 + * (c) 2001-2004 Carsten Siebholz <c.siebholz AT t-online.de>
1.11 + *
1.12 + * changes for Seiko-Epson displays: Mar 2004
1.13 + * (c) 2004 Heinz Gressenberger <heinz.gressenberger AT stmk.gv.at>
1.14 + *
1.15 + * init sequence taken from Thomas Baumann's LCD-Test program
1.16 + *
1.17 + * This file is released under the GNU General Public License. Refer
1.18 + * to the COPYING file distributed with this package.
1.19 + *
1.20 + * (c) 2003 Roland Praml <praml.roland AT t-online.de>
1.21 + */
1.22 +
1.23 +#ifndef _GLCDDRIVERS_SED1330_H_
1.24 +#define _GLCDDRIVERS_SED1330_H_
1.25 +
1.26 +#include "driver.h"
1.27 +
1.28 +
1.29 +namespace GLCD
1.30 +{
1.31 +
1.32 +class cDriverConfig;
1.33 +class cParallelPort;
1.34 +
1.35 +class cDriverSED1330 : public cDriver
1.36 +{
1.37 +private:
1.38 + cParallelPort * port;
1.39 + unsigned char ** newLCD; // wanted state
1.40 + unsigned char ** oldLCD; // current state
1.41 + int refreshCounter;
1.42 + long timeForPortCmdInNs;
1.43 + cDriverConfig * config;
1.44 + cDriverConfig * oldConfig;
1.45 + bool useSleepInit;
1.46 +
1.47 + int oscillatorFrequency;
1.48 + int interface;
1.49 + unsigned char A0HI;
1.50 + unsigned char A0LO;
1.51 + unsigned char RDHI;
1.52 + unsigned char RDLO;
1.53 + unsigned char ENHI;
1.54 + unsigned char ENLO;
1.55 + unsigned char WRHI;
1.56 + unsigned char WRLO;
1.57 + unsigned char RWHI;
1.58 + unsigned char RWLO;
1.59 + unsigned char CSHI;
1.60 + unsigned char CSLO;
1.61 +
1.62 + int CheckSetup();
1.63 + int InitGraphic();
1.64 + void WriteCmd(unsigned char cmd);
1.65 + void WriteData(unsigned char data);
1.66 +
1.67 +public:
1.68 + cDriverSED1330(cDriverConfig * config);
1.69 + virtual ~cDriverSED1330();
1.70 +
1.71 + virtual int Init();
1.72 + virtual int DeInit();
1.73 +
1.74 + virtual void Clear();
1.75 + virtual void Set8Pixels(int x, int y, unsigned char data);
1.76 + virtual void Refresh(bool refreshAll = false);
1.77 +};
1.78 +
1.79 +} // end of namespace
1.80 +
1.81 +#endif