author | root@rika |
Wed, 06 Feb 2008 17:32:55 +0000 | |
changeset 4 | df6a40031aa5 |
permissions | -rw-r--r-- |
root@4 | 1 |
/* |
root@4 | 2 |
* GraphLCD driver library |
root@4 | 3 |
* |
root@4 | 4 |
* sed1330.h - SED1330 driver class |
root@4 | 5 |
* |
root@4 | 6 |
* based on: hd61830.c |
root@4 | 7 |
* (c) 2001-2004 Carsten Siebholz <c.siebholz AT t-online.de> |
root@4 | 8 |
* |
root@4 | 9 |
* changes for Seiko-Epson displays: Mar 2004 |
root@4 | 10 |
* (c) 2004 Heinz Gressenberger <heinz.gressenberger AT stmk.gv.at> |
root@4 | 11 |
* |
root@4 | 12 |
* init sequence taken from Thomas Baumann's LCD-Test program |
root@4 | 13 |
* |
root@4 | 14 |
* This file is released under the GNU General Public License. Refer |
root@4 | 15 |
* to the COPYING file distributed with this package. |
root@4 | 16 |
* |
root@4 | 17 |
* (c) 2003 Roland Praml <praml.roland AT t-online.de> |
root@4 | 18 |
*/ |
root@4 | 19 |
|
root@4 | 20 |
#ifndef _GLCDDRIVERS_SED1330_H_ |
root@4 | 21 |
#define _GLCDDRIVERS_SED1330_H_ |
root@4 | 22 |
|
root@4 | 23 |
#include "driver.h" |
root@4 | 24 |
|
root@4 | 25 |
|
root@4 | 26 |
namespace GLCD |
root@4 | 27 |
{ |
root@4 | 28 |
|
root@4 | 29 |
class cDriverConfig; |
root@4 | 30 |
class cParallelPort; |
root@4 | 31 |
|
root@4 | 32 |
class cDriverSED1330 : public cDriver |
root@4 | 33 |
{ |
root@4 | 34 |
private: |
root@4 | 35 |
cParallelPort * port; |
root@4 | 36 |
unsigned char ** newLCD; // wanted state |
root@4 | 37 |
unsigned char ** oldLCD; // current state |
root@4 | 38 |
int refreshCounter; |
root@4 | 39 |
long timeForPortCmdInNs; |
root@4 | 40 |
cDriverConfig * config; |
root@4 | 41 |
cDriverConfig * oldConfig; |
root@4 | 42 |
bool useSleepInit; |
root@4 | 43 |
|
root@4 | 44 |
int oscillatorFrequency; |
root@4 | 45 |
int interface; |
root@4 | 46 |
unsigned char A0HI; |
root@4 | 47 |
unsigned char A0LO; |
root@4 | 48 |
unsigned char RDHI; |
root@4 | 49 |
unsigned char RDLO; |
root@4 | 50 |
unsigned char ENHI; |
root@4 | 51 |
unsigned char ENLO; |
root@4 | 52 |
unsigned char WRHI; |
root@4 | 53 |
unsigned char WRLO; |
root@4 | 54 |
unsigned char RWHI; |
root@4 | 55 |
unsigned char RWLO; |
root@4 | 56 |
unsigned char CSHI; |
root@4 | 57 |
unsigned char CSLO; |
root@4 | 58 |
|
root@4 | 59 |
int CheckSetup(); |
root@4 | 60 |
int InitGraphic(); |
root@4 | 61 |
void WriteCmd(unsigned char cmd); |
root@4 | 62 |
void WriteData(unsigned char data); |
root@4 | 63 |
|
root@4 | 64 |
public: |
root@4 | 65 |
cDriverSED1330(cDriverConfig * config); |
root@4 | 66 |
virtual ~cDriverSED1330(); |
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 |