From 3f5efb8d1cf9488552826a2816552fa67bb9f50e Mon Sep 17 00:00:00 2001 From: vanhofen Date: Thu, 18 Jun 2020 22:03:39 +0200 Subject: [PATCH] - graphlcd: update vuplus driver patch --- .../0005-add-vuplus-driver.patch | 34 +++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/patches/graphlcd-base/0005-add-vuplus-driver.patch b/patches/graphlcd-base/0005-add-vuplus-driver.patch index 78849891..2d0d1ac3 100644 --- a/patches/graphlcd-base/0005-add-vuplus-driver.patch +++ b/patches/graphlcd-base/0005-add-vuplus-driver.patch @@ -45,6 +45,17 @@ case kDriverUnknown: default: return NULL; +--- a/glcddrivers/driver.h ++++ b/glcddrivers/driver.h +@@ -74,7 +74,7 @@ public: + virtual void Refresh(bool refreshAll = false) {} + + virtual void SetBrightness(unsigned int percent) {} +- ++ virtual void SetMirrorVideo(bool mirror) {} + + virtual bool SetFeature (const std::string & Feature, int value) { return false; } + --- a/glcddrivers/drivers.h +++ b/glcddrivers/drivers.h @@ -58,6 +58,9 @@ @@ -59,7 +70,7 @@ }; --- /dev/null +++ b/glcddrivers/vuplus4k.c -@@ -0,0 +1,264 @@ +@@ -0,0 +1,282 @@ +/* + * GraphLCD driver library + * @@ -323,10 +334,28 @@ + } +} + ++void cDriverVUPLUS4K::SetMirrorVideo(bool mirror) ++{ ++ const char *value = ""; ++ ++ if (mirror) ++ value = "enable"; ++ else ++ value = "disable"; ++ ++ FILE *f = fopen("/proc/stb/lcd/live_enable", "w"); ++ if (f) ++ { ++ if (fprintf(f, "%s", value) == 0) ++ printf("write /proc/stb/lcd/live_enable failed!! (%m)\n"); ++ fclose(f); ++ } ++} ++ +} // end of namespace --- /dev/null +++ b/glcddrivers/vuplus4k.h -@@ -0,0 +1,64 @@ +@@ -0,0 +1,65 @@ +/* + * GraphLCD driver library + * @@ -386,6 +415,7 @@ + //virtual void Set8Pixels(int x, int y, unsigned char data); + virtual void Refresh(bool refreshAll = false); + virtual void SetBrightness(unsigned int percent); ++ virtual void SetMirrorVideo(bool mirror); +}; + +} // end of namespace