summaryrefslogtreecommitdiff
path: root/glcddrivers/gu256x64-372.c
diff options
context:
space:
mode:
authormrwastl <mrwastl@users.sourceforge.net>2011-06-25 21:52:54 +0200
committermrwastl <mrwastl@users.sourceforge.net>2011-06-25 21:52:54 +0200
commit82d929736a6188583fe3283b8fa2ce776f3cca21 (patch)
tree1a894c5a603415086db3e3cdbb9b8d15fabc94a5 /glcddrivers/gu256x64-372.c
parentd7b7ae09a995d8ceab70a9d7904a7b9e25beba00 (diff)
downloadgraphlcd-base-82d929736a6188583fe3283b8fa2ce776f3cca21.tar.gz
graphlcd-base-82d929736a6188583fe3283b8fa2ce776f3cca21.tar.bz2
adapt all drivers to support SetPixel() with 32bit colours; Set8Pixels() is no longer virtual (generic implementation in base class)
Diffstat (limited to 'glcddrivers/gu256x64-372.c')
-rw-r--r--glcddrivers/gu256x64-372.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/glcddrivers/gu256x64-372.c b/glcddrivers/gu256x64-372.c
index 41f5881..5615708 100644
--- a/glcddrivers/gu256x64-372.c
+++ b/glcddrivers/gu256x64-372.c
@@ -16,7 +16,8 @@
* This file is released under the GNU General Public License. Refer
* to the COPYING file distributed with this package.
*
- * (c) 2004 Andreas 'randy' Weinberger (randy AT smue.org)
+ * (c) 2004-2011 Andreas 'randy' Weinberger (randy AT smue.org)
+ * (c) 2011 Wolfgang Astleitner <mrwastl AT users.sourceforge.net>
*/
#include <errno.h>
@@ -365,9 +366,13 @@ void cDriverGU256X64_372::SetPixel(int x, int y, uint32_t data)
c = 0x80 >> (y % 8);
- m_pDrawMem[x][y/8] = m_pDrawMem[x][y/8] | c;
+ if (data == GLCD::cColor::White)
+ m_pDrawMem[x][y/8] |= c;
+ else
+ m_pDrawMem[x][y/8] &= ( 0xFF ^ c );
}
+#if 0
void cDriverGU256X64_372::Set8Pixels(int x, int y, unsigned char data)
{
int n;
@@ -381,6 +386,7 @@ void cDriverGU256X64_372::Set8Pixels(int x, int y, unsigned char data)
SetPixel(x + n, y, GLCD::cColor::White);
}
}
+#endif
void cDriverGU256X64_372::Refresh(bool refreshAll)
{