From 3bbe763488aa84fdf29047b6b38acd11f8274862 Mon Sep 17 00:00:00 2001 From: Manuel Reimer Date: Sat, 3 Feb 2018 16:43:53 +0100 Subject: Add usbserlcd driver --- glcddrivers/usbserlcd.h | 61 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 glcddrivers/usbserlcd.h (limited to 'glcddrivers/usbserlcd.h') diff --git a/glcddrivers/usbserlcd.h b/glcddrivers/usbserlcd.h new file mode 100644 index 0000000..698e90c --- /dev/null +++ b/glcddrivers/usbserlcd.h @@ -0,0 +1,61 @@ +/* + * GraphLCD driver library + * + * t6963c.h - T6963C driver class + * + * low level routines based on lcdproc 0.5 driver, (c) 2001 Manuel Stahl + * + * This file is released under the GNU General Public License. Refer + * to the COPYING file distributed with this package. + * + * (c) 2003-2004 Andreas Regel + * (c) 2011 Wolfgang Astleitner + */ + +#ifndef _GLCDDRIVERS_USBSERLED_H_ +#define _GLCDDRIVERS_USBSERLED_H_ + +#include "driver.h" + +namespace GLCD +{ + +class cDriverConfig; +class cSerialPort; + +// Possible serial package types +enum glcd_pkgtype: char { + PKGTYPE_DATA, + PKGTYPE_BRIGHTNESS +}; + +class cDriverUSBserLCD : public cDriver +{ +private: + cSerialPort * port; + unsigned char ** newLCD; // wanted state + unsigned char ** oldLCD; // current state + int refreshCounter; + int displayMode; + + int FS; + char brightness; + + int CheckSetup(); + +public: + cDriverUSBserLCD(cDriverConfig * config); + virtual ~cDriverUSBserLCD(); + + virtual int Init(); + virtual int DeInit(); + + virtual void Clear(); + virtual void SetPixel(int x, int y, uint32_t data); + virtual void Refresh(bool refreshAll = false); + virtual void SetBrightness(unsigned int percent); +}; + +} // end of namespace + +#endif -- cgit v1.2.3