2 * GraphLCD driver library
4 * gu126x64D-K610A4.h - 8-bit driver module for Noritake GU126x64D-K610A4 VFD
5 * displays. The VFD is operating in its 8 bit-mode
6 * connected to a single PC parallel port.
9 * gu256x64-372 driver module for graphlcd
10 * (c) 2004 Andreas 'randy' Weinberger (randy AT smue.org)
11 * gu256x64-3900 driver module for graphlcd
12 * (c) 2004 Ralf Mueller (ralf AT bj-ig.de)
13 * gu140x32f driver module for graphlcd
14 * (c) 2003 Andreas Brachold <vdr04 AT deltab.de>
15 * ks0108 driver module for graphlcd
16 * (c) 2004 Andreas 'randy' Weinberger (randy AT smue.org)
18 * This file is released under the GNU General Public License. Refer
19 * to the COPYING file distributed with this package.
21 * (c) 2007 Alexander Rieger (Alexander.Rieger AT inka.de)
24 #ifndef _GLCDDRIVERS_GU126X64D_K610A4_H_
25 #define _GLCDDRIVERS_GU126X64D_K610A4_H_
29 //===============================================================================
31 //===============================================================================
38 //===============================================================================
39 // class cDriverGU126X64D_K610A4
40 //===============================================================================
41 class cDriverGU126X64D_K610A4 : public cDriver
44 //---------------------------------------------------------------------------
45 // constructor/destructor
46 //---------------------------------------------------------------------------
47 cDriverGU126X64D_K610A4(cDriverConfig * config);
48 virtual ~cDriverGU126X64D_K610A4();
50 //---------------------------------------------------------------------------
52 //---------------------------------------------------------------------------
57 virtual void Set8Pixels(int x, int y, unsigned char data);
58 virtual void Refresh(bool refreshAll = false);
59 virtual void SetBrightness(unsigned int percent);
61 //---------------------------------------------------------------------------
62 // display-specific enums/methods/etc.
63 //---------------------------------------------------------------------------
71 void setPixel (int x, int y);
74 int cmdPower (bool fOn);
75 int cmdLock (bool fLock);
76 int cmdSetCursorPos (unsigned char x, unsigned char y);
77 int cmdGraphicWrite (unsigned char count);
78 int cmdGraphicData (unsigned char data);
79 int cmdSetBrightness(unsigned int percent);
80 int cmdSetFont (FontType);
81 int cmdWriteText (const char *theText);
82 int cmdDrawRect (unsigned char x1, unsigned char y1, unsigned char x2, unsigned char y2);
83 int cmdSetMacro (unsigned char theMacroNum, unsigned char theCountBytes);
84 int cmdSetPixel (bool fSet = true);
91 //---------------------------------------------------------------------------
93 //---------------------------------------------------------------------------
96 int initParallelPort();
99 bool waitForStatus(unsigned char theMask, unsigned char theValue, int theMaxWait);
100 void writeParallel(unsigned char data);
101 int write(unsigned char data);
103 void ensureNotInGraphics();
104 bool isLogEnabled(int theLevel) const;
106 //---------------------------------------------------------------------------
108 //---------------------------------------------------------------------------
111 cDriverConfig *config;
112 cDriverConfig *oldConfig;
115 unsigned char **myDrawMem;
116 unsigned char **myVFDMem;
121 int myRefreshCounter;
123 int myDataPendingCounter;
124 unsigned int myLogFlags;
126 }; // class cDriverGU126X64D_K610A4