From 82d929736a6188583fe3283b8fa2ce776f3cca21 Mon Sep 17 00:00:00 2001 From: mrwastl Date: Sat, 25 Jun 2011 21:52:54 +0200 Subject: adapt all drivers to support SetPixel() with 32bit colours; Set8Pixels() is no longer virtual (generic implementation in base class) --- glcddrivers/gu140x32f.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'glcddrivers/gu140x32f.c') diff --git a/glcddrivers/gu140x32f.c b/glcddrivers/gu140x32f.c index 865d133..3baf6f1 100644 --- a/glcddrivers/gu140x32f.c +++ b/glcddrivers/gu140x32f.c @@ -14,7 +14,9 @@ * This file is released under the GNU General Public License. Refer * to the COPYING file distributed with this package. * - * (c) 2003 Andreas Brachold + * (c) 2003 Andreas Brachold + * (c) 2005-2010 Andreas Regel + * (c) 2011 Wolfgang Astleitner */ #include @@ -348,9 +350,13 @@ void cDriverGU140X32F::SetPixel(int x, int y, uint32_t data) n = x + ((y / 8) * width); c = 0x80 >> (y % 8); - m_pDrawMem[n] |= c; + if (data == GLCD::cColor::White) + m_pDrawMem[n] |= c; + else + m_pDrawMem[n] &= (0xFF ^ c); } +#if 0 void cDriverGU140X32F::Set8Pixels(int x, int y, unsigned char data) { int n; @@ -364,6 +370,7 @@ void cDriverGU140X32F::Set8Pixels(int x, int y, unsigned char data) SetPixel(x + n, y, GLCD::cColor::White); } } +#endif void cDriverGU140X32F::Refresh(bool refreshAll) { -- cgit v1.2.3