1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/graphlcd-base/glcddrivers/t6963c.h Wed Feb 06 17:32:55 2008 +0000
1.3 @@ -0,0 +1,76 @@
1.4 +/*
1.5 + * GraphLCD driver library
1.6 + *
1.7 + * t6963c.h - T6963C driver class
1.8 + *
1.9 + * low level routines based on lcdproc 0.5 driver, (c) 2001 Manuel Stahl
1.10 + *
1.11 + * This file is released under the GNU General Public License. Refer
1.12 + * to the COPYING file distributed with this package.
1.13 + *
1.14 + * (c) 2003, 2004 Andreas Regel <andreas.regel AT powarman.de>
1.15 + */
1.16 +
1.17 +#ifndef _GLCDDRIVERS_T6963C_H_
1.18 +#define _GLCDDRIVERS_T6963C_H_
1.19 +
1.20 +#include "driver.h"
1.21 +
1.22 +namespace GLCD
1.23 +{
1.24 +
1.25 +class cDriverConfig;
1.26 +class cParallelPort;
1.27 +
1.28 +class cDriverT6963C : public cDriver
1.29 +{
1.30 +private:
1.31 + cParallelPort * port;
1.32 + unsigned char ** newLCD; // wanted state
1.33 + unsigned char ** oldLCD; // current state
1.34 + cDriverConfig * config;
1.35 + cDriverConfig * oldConfig;
1.36 + int refreshCounter;
1.37 + int bidirectLPT;
1.38 + int displayMode;
1.39 + bool useAutoMode;
1.40 + bool useStatusCheck;
1.41 +
1.42 + int serial;
1.43 + int FS;
1.44 + int WRHI;
1.45 + int WRLO;
1.46 + int RDHI;
1.47 + int RDLO;
1.48 + int CEHI;
1.49 + int CELO;
1.50 + int CDHI;
1.51 + int CDLO;
1.52 + bool autoWrite;
1.53 +
1.54 + void T6963CSetControl(unsigned char flags);
1.55 + void T6963CDSPReady();
1.56 + void T6963CData(unsigned char data);
1.57 + void T6963CCommand(unsigned char cmd);
1.58 + void T6963CCommandByte(unsigned char cmd, unsigned char data);
1.59 + void T6963CCommand2Bytes(unsigned char cmd, unsigned char data1, unsigned char data2);
1.60 + void T6963CCommandWord(unsigned char cmd, unsigned short data);
1.61 + void T6963CDisplayMode(unsigned char mode, bool enable);
1.62 +
1.63 + int CheckSetup();
1.64 +
1.65 +public:
1.66 + cDriverT6963C(cDriverConfig * config);
1.67 + virtual ~cDriverT6963C();
1.68 +
1.69 + virtual int Init();
1.70 + virtual int DeInit();
1.71 +
1.72 + virtual void Clear();
1.73 + virtual void Set8Pixels(int x, int y, unsigned char data);
1.74 + virtual void Refresh(bool refreshAll = false);
1.75 +};
1.76 +
1.77 +} // end of namespace
1.78 +
1.79 +#endif