diff options
author | mrwastl <mrwastl@users.sourceforge.net> | 2011-09-23 20:04:59 +0200 |
---|---|---|
committer | mrwastl <mrwastl@users.sourceforge.net> | 2011-09-23 20:04:59 +0200 |
commit | d82aaf34feead02bab70b12c7c8c2effb1187862 (patch) | |
tree | 799ee0756bd0b69e6c2696389b6f1f8e27a1a20c /glcddrivers/ax206dpf.h | |
parent | 72fa990816f5feadb561f75b78dd4324153dc8c0 (diff) | |
download | graphlcd-base-d82aaf34feead02bab70b12c7c8c2effb1187862.tar.gz graphlcd-base-d82aaf34feead02bab70b12c7c8c2effb1187862.tar.bz2 |
patches for thread-safeness of AX206DPF driver (contrib by superelchi)
Diffstat (limited to 'glcddrivers/ax206dpf.h')
-rw-r--r-- | glcddrivers/ax206dpf.h | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/glcddrivers/ax206dpf.h b/glcddrivers/ax206dpf.h index cc5e608..d683ccf 100644 --- a/glcddrivers/ax206dpf.h +++ b/glcddrivers/ax206dpf.h @@ -25,9 +25,6 @@ * * (c) 2011 Lutz Neumann <superelchi AT wolke7.net> * - * HISTORY - * - * v0.1 - 10 Aug 2011 - Inital release */ #ifndef _GLCDDRIVERS_AX206DPF_H_ @@ -35,6 +32,11 @@ #include "driver.h" +namespace LIBDPF { +struct dpf_context; +typedef dpf_context DPFContext; +} + namespace GLCD { #define MAX_DPFS 4 @@ -45,6 +47,19 @@ namespace GLCD #define USB_SCAN_INTERVALL 10 // seconds between usb scans for missing displays +typedef struct display_handle { + bool attached; + char address[8]; + bool isPortrait; + bool rotate90; + bool flip; + int minx, maxx; + int miny, maxy; + LIBDPF::DPFContext *dpfh; + unsigned char * LCD; +} DISPLAYHANDLE; + + class cDriverConfig; class cDriverAX206DPF : public cDriver @@ -61,6 +76,12 @@ private: unsigned int sizey; // logical vertical size of one display unsigned int bpp; // bits per pixel + DISPLAYHANDLE *dh[MAX_DPFS]; + std::string flips; + time_t lastscan; + int lastbrightness; + + int CheckSetup(); void ResetMinMax(); bool RescanUSB(); |