graphlcd-base/glcddrivers/ks0108.h
author root@rika
Wed, 06 Feb 2008 17:32:55 +0000
changeset 4 df6a40031aa5
permissions -rw-r--r--
added graphlcd-base
root@4
     1
/*
root@4
     2
 * GraphLCD driver library
root@4
     3
 *
root@4
     4
 * ks0108.h  -  KS0108 driver class
root@4
     5
 *
root@4
     6
 * This file is released under the GNU General Public License. Refer
root@4
     7
 * to the COPYING file distributed with this package.
root@4
     8
 *
root@4
     9
 * (c) 2003 Andreas 'randy' Weinberger <vdr AT smue.org>
root@4
    10
 */
root@4
    11
root@4
    12
#ifndef _GLCDDRIVERS_KS0108_H_
root@4
    13
#define _GLCDDRIVERS_KS0108_H_
root@4
    14
root@4
    15
#include "driver.h"
root@4
    16
root@4
    17
root@4
    18
namespace GLCD
root@4
    19
{
root@4
    20
root@4
    21
class cDriverConfig;
root@4
    22
class cParallelPort;
root@4
    23
root@4
    24
class cDriverKS0108 : public cDriver
root@4
    25
{
root@4
    26
private:
root@4
    27
    cParallelPort * port;
root@4
    28
    unsigned char ** LCD;      // linear lcd display "memory"
root@4
    29
    unsigned char ** LCD_page; // paged lcd display "memory"
root@4
    30
    int refreshCounter;
root@4
    31
    long timeForPortCmdInNs;
root@4
    32
    long timeForLCDInNs;
root@4
    33
    cDriverConfig * config;
root@4
    34
    cDriverConfig * oldConfig;
root@4
    35
    bool useSleepInit;
root@4
    36
root@4
    37
    int CheckSetup();
root@4
    38
    int InitGraphic();
root@4
    39
    void KS0108Cmd(unsigned char data, int cs);
root@4
    40
    void KS0108Data(unsigned char data, int cs);
root@4
    41
root@4
    42
    int SEAD;
root@4
    43
    int SEPA;
root@4
    44
    int SEDS;
root@4
    45
    int DIOF;
root@4
    46
    int DION;
root@4
    47
root@4
    48
    int CEHI;
root@4
    49
    int CELO;
root@4
    50
    int CDHI;
root@4
    51
    int CDLO;
root@4
    52
    int CS1HI;
root@4
    53
    int CS1LO;
root@4
    54
    int CS2HI;
root@4
    55
    int CS2LO;
root@4
    56
root@4
    57
    int CS1;
root@4
    58
    int CS2;
root@4
    59
    int CS3;
root@4
    60
    int CS4;
root@4
    61
root@4
    62
    unsigned char control;
root@4
    63
root@4
    64
public:
root@4
    65
    cDriverKS0108(cDriverConfig * config);
root@4
    66
    virtual ~cDriverKS0108();
root@4
    67
root@4
    68
    virtual int Init();
root@4
    69
    virtual int DeInit();
root@4
    70
root@4
    71
    virtual void Clear();
root@4
    72
    virtual void Set8Pixels(int x, int y, unsigned char data);
root@4
    73
    virtual void Refresh(bool refreshAll = false);
root@4
    74
};
root@4
    75
root@4
    76
} // end of namespace
root@4
    77
root@4
    78
#endif