From 10ab31fa86dbf9875b5f6baa6ac59fefaaf86be3 Mon Sep 17 00:00:00 2001 From: andreas 'randy' weinberger Date: Sun, 21 Feb 2010 19:58:27 +0100 Subject: initial git upload, based on graphlcd-base-0.1.5 --- glcddrivers/gu256x64-3900.h | 87 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 glcddrivers/gu256x64-3900.h (limited to 'glcddrivers/gu256x64-3900.h') diff --git a/glcddrivers/gu256x64-3900.h b/glcddrivers/gu256x64-3900.h new file mode 100644 index 0000000..2201417 --- /dev/null +++ b/glcddrivers/gu256x64-3900.h @@ -0,0 +1,87 @@ +/* + * GraphLCD driver library + * + * gu256x64-3900.h - 8-bit driver module for Noritake GU256X64x-3900 + * VFD displays. The VFD is either operating in + * 8-bit mode connected to a single PC parallel + * port or in serial mode connected to a single PC + * serial port. + * + * based on: + * gu256x64-372 driver module for graphlcd + * (c) 2004 Andreas 'randy' Weinberger + * gu140x32f driver module for graphlcd + * (c) 2003 Andreas Brachold + * HD61830 device + * (c) 2001-2003 by Carsten Siebholz + * lcdproc 0.4 driver hd44780-ext8bit + * (c) 1999, 1995 Benjamin Tse + * + * This file is released under the GNU General Public License. Refer + * to the COPYING file distributed with this package. + * + * (c) 2004 Ralf Mueller (ralf AT bj-ig.de) + */ + +#ifndef _GLCDDRIVERS_GU256X64_3900_H_ +#define _GLCDDRIVERS_GU256X64_3900_H_ + +#include "driver.h" + +namespace GLCD +{ + +class cDriverConfig; +class cParallelPort; + +class cDriverGU256X64_3900 : public cDriver +{ + cParallelPort * port; + int portFd; + + cDriverConfig * config; + cDriverConfig * oldConfig; + + int m_iSizeYb; + int m_nRefreshCounter; + int interface; + bool useDMA; + unsigned char readyMask; + unsigned char readyHi; + + unsigned char ** m_pDrawMem; // the draw "memory" + unsigned char ** m_pVFDMem; // the double buffed display "memory" + + long m_nTimingAdjustCmd; + bool m_bSleepIsInit; + + int CheckSetup(); + +protected: + void ClearVFDMem(); + void SetPixel(int x, int y); + int InitSerialPort(); + int InitParallelPort(); + void InitNormalDisplay(); + void InitDMADisplay(); + + void WriteSerial(unsigned char data); + void WriteParallel(unsigned char data); + void Write(unsigned char data); +public: + cDriverGU256X64_3900(cDriverConfig * config); + virtual ~cDriverGU256X64_3900(); + + virtual int Init(); + virtual int DeInit(); + + virtual void Clear(); + virtual void Set8Pixels(int x, int y, unsigned char data); + virtual void Refresh(bool refreshAll = false); + + virtual void SetBrightness(unsigned int percent); +}; + +} // end of namespace + +#endif -- cgit v1.2.3