summaryrefslogtreecommitdiff
path: root/glcddrivers/ax206dpf.c
diff options
context:
space:
mode:
authormrwastl <mrwastl@users.sourceforge.net>2011-09-23 20:04:59 +0200
committermrwastl <mrwastl@users.sourceforge.net>2011-09-23 20:04:59 +0200
commitd82aaf34feead02bab70b12c7c8c2effb1187862 (patch)
tree799ee0756bd0b69e6c2696389b6f1f8e27a1a20c /glcddrivers/ax206dpf.c
parent72fa990816f5feadb561f75b78dd4324153dc8c0 (diff)
downloadgraphlcd-base-d82aaf34feead02bab70b12c7c8c2effb1187862.tar.gz
graphlcd-base-d82aaf34feead02bab70b12c7c8c2effb1187862.tar.bz2
patches for thread-safeness of AX206DPF driver (contrib by superelchi)
Diffstat (limited to 'glcddrivers/ax206dpf.c')
-rw-r--r--glcddrivers/ax206dpf.c20
1 files changed, 3 insertions, 17 deletions
diff --git a/glcddrivers/ax206dpf.c b/glcddrivers/ax206dpf.c
index 9ff2c39..7c9935a 100644
--- a/glcddrivers/ax206dpf.c
+++ b/glcddrivers/ax206dpf.c
@@ -29,9 +29,10 @@
* HISTORY
*
* v0.1 - 10 Aug 2011 - Inital release
- * V0.2 - 20 Aug 2011 - Optimized display data transfer
+ * v0.2 - 20 Aug 2011 - Optimized display data transfer
* SetBrightness() implemented
* Multi-display support
+ * v0.3 - 02 Sep 2011 - Fixed multi-thread problem
*
*
*/
@@ -52,23 +53,8 @@
namespace GLCD
{
-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;
-
-static DISPLAYHANDLE *dh[MAX_DPFS];
+
static pthread_mutex_t libax_mutex;
-static std::string flips = "";
-static time_t lastscan;
-static int lastbrightness;
cDriverAX206DPF::cDriverAX206DPF(cDriverConfig * config)