author | root@rika |
Wed, 06 Feb 2008 17:37:50 +0000 | |
changeset 5 | 37602e25a04a |
parent 4 | df6a40031aa5 |
permissions | -rw-r--r-- |
root@4 | 1 |
/* |
root@4 | 2 |
* GraphLCD driver library |
root@4 | 3 |
* |
root@4 | 4 |
* avrctl.h - AVR controlled LCD 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) 2005 Andreas Regel <andreas.regel AT powarman.de> |
root@4 | 10 |
*/ |
root@4 | 11 |
|
root@4 | 12 |
#ifndef _GLCDDRIVERS_AVRCTL_H_ |
root@4 | 13 |
#define _GLCDDRIVERS_AVRCTL_H_ |
root@4 | 14 |
|
root@4 | 15 |
#include "driver.h" |
root@4 | 16 |
|
root@4 | 17 |
namespace GLCD |
root@4 | 18 |
{ |
root@4 | 19 |
|
root@4 | 20 |
class cDriverConfig; |
root@4 | 21 |
class cSerialPort; |
root@4 | 22 |
|
root@4 | 23 |
class cDriverAvrCtl : public cDriver |
root@4 | 24 |
{ |
root@4 | 25 |
private: |
root@4 | 26 |
cSerialPort * port; |
root@4 | 27 |
unsigned char ** newLCD; // wanted state |
root@4 | 28 |
unsigned char ** oldLCD; // current state |
root@4 | 29 |
cDriverConfig * config; |
root@4 | 30 |
cDriverConfig * oldConfig; |
root@4 | 31 |
int refreshCounter; |
root@4 | 32 |
|
root@4 | 33 |
int WaitForAck(void); |
root@4 | 34 |
void CmdSysSync(void); |
root@4 | 35 |
void CmdDispClearScreen(void); |
root@4 | 36 |
void CmdDispSwitchScreen(void); |
root@4 | 37 |
void CmdDispSetBrightness(unsigned char percent); |
root@4 | 38 |
void CmdDispSetColData(uint16_t column, uint16_t offset, uint16_t length, uint8_t * data); |
root@4 | 39 |
void CmdDispUpdate(void); |
root@4 | 40 |
|
root@4 | 41 |
int CheckSetup(); |
root@4 | 42 |
|
root@4 | 43 |
public: |
root@4 | 44 |
cDriverAvrCtl(cDriverConfig * config); |
root@4 | 45 |
virtual ~cDriverAvrCtl(); |
root@4 | 46 |
|
root@4 | 47 |
virtual int Init(); |
root@4 | 48 |
virtual int DeInit(); |
root@4 | 49 |
|
root@4 | 50 |
virtual void Clear(); |
root@4 | 51 |
virtual void Set8Pixels(int x, int y, unsigned char data); |
root@4 | 52 |
virtual void Refresh(bool refreshAll = false); |
root@4 | 53 |
virtual void SetBrightness(unsigned int percent); |
root@4 | 54 |
}; |
root@4 | 55 |
|
root@4 | 56 |
} // end of namespace |
root@4 | 57 |
|
root@4 | 58 |
#endif |