diff options
author | mrwastl <mrwastl@users.sourceforge.net> | 2011-06-25 21:52:54 +0200 |
---|---|---|
committer | mrwastl <mrwastl@users.sourceforge.net> | 2011-06-25 21:52:54 +0200 |
commit | 82d929736a6188583fe3283b8fa2ce776f3cca21 (patch) | |
tree | 1a894c5a603415086db3e3cdbb9b8d15fabc94a5 /glcddrivers/gu140x32f.c | |
parent | d7b7ae09a995d8ceab70a9d7904a7b9e25beba00 (diff) | |
download | graphlcd-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/gu140x32f.c')
-rw-r--r-- | glcddrivers/gu140x32f.c | 11 |
1 files changed, 9 insertions, 2 deletions
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 <vdr04 AT deltab.de> + * (c) 2003 Andreas Brachold <vdr04 AT deltab.de> + * (c) 2005-2010 Andreas Regel <andreas.regel AT powarman.de> + * (c) 2011 Wolfgang Astleitner <mrwastl AT users.sourceforge.net> */ #include <errno.h> @@ -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) { |