diff options
author | andreas 'randy' weinberger <vdr@smue.org> | 2010-02-21 19:58:27 +0100 |
---|---|---|
committer | andreas 'randy' weinberger <vdr@smue.org> | 2010-02-21 19:58:27 +0100 |
commit | 10ab31fa86dbf9875b5f6baa6ac59fefaaf86be3 (patch) | |
tree | 60ad7c856565f03e145b2996d1bb5f9cd64c0532 /glcddrivers/avrctl.h | |
download | graphlcd-base-10ab31fa86dbf9875b5f6baa6ac59fefaaf86be3.tar.gz graphlcd-base-10ab31fa86dbf9875b5f6baa6ac59fefaaf86be3.tar.bz2 |
initial git upload, based on graphlcd-base-0.1.5
Diffstat (limited to 'glcddrivers/avrctl.h')
-rw-r--r-- | glcddrivers/avrctl.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/glcddrivers/avrctl.h b/glcddrivers/avrctl.h new file mode 100644 index 0000000..557b7d2 --- /dev/null +++ b/glcddrivers/avrctl.h @@ -0,0 +1,58 @@ +/* + * GraphLCD driver library + * + * avrctl.h - AVR controlled LCD driver class + * + * This file is released under the GNU General Public License. Refer + * to the COPYING file distributed with this package. + * + * (c) 2005 Andreas Regel <andreas.regel AT powarman.de> + */ + +#ifndef _GLCDDRIVERS_AVRCTL_H_ +#define _GLCDDRIVERS_AVRCTL_H_ + +#include "driver.h" + +namespace GLCD +{ + +class cDriverConfig; +class cSerialPort; + +class cDriverAvrCtl : public cDriver +{ +private: + cSerialPort * port; + unsigned char ** newLCD; // wanted state + unsigned char ** oldLCD; // current state + cDriverConfig * config; + cDriverConfig * oldConfig; + int refreshCounter; + + int WaitForAck(void); + void CmdSysSync(void); + void CmdDispClearScreen(void); + void CmdDispSwitchScreen(void); + void CmdDispSetBrightness(unsigned char percent); + void CmdDispSetColData(uint16_t column, uint16_t offset, uint16_t length, uint8_t * data); + void CmdDispUpdate(void); + + int CheckSetup(); + +public: + cDriverAvrCtl(cDriverConfig * config); + virtual ~cDriverAvrCtl(); + + 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 |