graphlcd-base/glcddrivers/gu140x32f.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  * gu140x32f.h  -  8-bit driver module for Noritake GU140x32-F7806 VFD
     5  *                 displays. The VFD is operating in its 8 bit-mode
     6  *                 connected to a single PC parallel port.
     7  *
     8  * based on:
     9  *   HD61830 device
    10  *     (c) 2001-2003 by Carsten Siebholz <c.siebholz AT t-online.de>
    11  *   lcdproc 0.4 driver hd44780-ext8bit
    12  *     (c) 1999, 1995 Benjamin Tse <blt AT Comports com>
    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 Andreas Brachold <vdr04 AT deltab.de>
    18  */
    19 
    20 #ifndef _GLCDDRIVERS_GU140X32F_H_
    21 #define _GLCDDRIVERS_GU140X32F_H_
    22 
    23 #include "driver.h"
    24 
    25 
    26 namespace GLCD
    27 {
    28 
    29 class cDriverConfig;
    30 class cParallelPort;
    31 
    32 
    33 class cDriverGU140X32F : public cDriver
    34 {
    35     unsigned char m_WiringRS;
    36     unsigned char m_WiringEN1;
    37 
    38     cParallelPort * port;
    39 
    40     cDriverConfig * config;
    41     cDriverConfig * oldConfig;
    42 
    43     int m_iSizeYb;
    44     int m_nRefreshCounter;
    45     unsigned char *m_pDrawMem; // the draw "memory"
    46     unsigned char *m_pVFDMem;  // the double buffed display "memory"
    47     long m_nTimingAdjustCmd;
    48     bool m_bSleepIsInit;
    49 
    50     int CheckSetup();
    51 
    52 protected:
    53     void ClearVFDMem();
    54     void SetPixel(int x, int y);
    55     void Write(unsigned char nFlags, unsigned char bData, unsigned int nMicroSecBusyTime);
    56 
    57 public:
    58     cDriverGU140X32F(cDriverConfig * config);
    59     virtual ~cDriverGU140X32F();
    60 
    61     virtual int Init();
    62     virtual int DeInit();
    63 
    64     virtual void Clear();
    65     virtual void Set8Pixels(int x, int y, unsigned char data);
    66     virtual void Refresh(bool refreshAll = false);
    67 
    68     virtual void SetBrightness(unsigned int percent);
    69 };
    70 
    71 } // end of namespace
    72 
    73 #endif