From d82aaf34feead02bab70b12c7c8c2effb1187862 Mon Sep 17 00:00:00 2001 From: mrwastl Date: Fri, 23 Sep 2011 20:04:59 +0200 Subject: patches for thread-safeness of AX206DPF driver (contrib by superelchi) --- glcddrivers/ax206dpf.h | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) (limited to 'glcddrivers/ax206dpf.h') 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 * - * 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(); -- cgit v1.2.3