diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2010-04-18 02:56:15 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2010-04-18 02:56:15 +0000 |
commit | 9503945271e3740832c5aa4d66083b27f99420ac (patch) | |
tree | a3ead8e27254ad26ee4b47a8d5b50b96e609c957 /nuttx/graphics/nxglib/nxglib_copyrun.h | |
parent | eb89fdaa39dede1a8e37519ae3ec4ffa588e705c (diff) | |
download | px4-nuttx-9503945271e3740832c5aa4d66083b27f99420ac.tar.gz px4-nuttx-9503945271e3740832c5aa4d66083b27f99420ac.tar.bz2 px4-nuttx-9503945271e3740832c5aa4d66083b27f99420ac.zip |
Code complete for NX for LCD
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2610 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/graphics/nxglib/nxglib_copyrun.h')
-rw-r--r-- | nuttx/graphics/nxglib/nxglib_copyrun.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/nuttx/graphics/nxglib/nxglib_copyrun.h b/nuttx/graphics/nxglib/nxglib_copyrun.h index 500d2fb75..b97372bf7 100644 --- a/nuttx/graphics/nxglib/nxglib_copyrun.h +++ b/nuttx/graphics/nxglib/nxglib_copyrun.h @@ -79,10 +79,11 @@ #if NXGLIB_BITSPERPIXEL == 1 static inline void nxgl_copyrun_1bpp(FAR const uint8_t *src, FAR uint8_t *dest, - unsigned int inbit, size_t npixels) + unsigned int remainder, size_t npixels) { uint8_t indata; uint8_t outdata; + uint8_t nextdata; unsigned int outpixels = 0; DEBUGASSERT(remainder > 0 && remainder < 8); @@ -166,10 +167,11 @@ nxgl_copyrun_1bpp(FAR const uint8_t *src, FAR uint8_t *dest, #elif NXGLIB_BITSPERPIXEL == 2 static inline void nxgl_copyrun_2bpp(FAR const uint8_t *src, FAR uint8_t *dest, - unsigned int inbit, size_t npixels) + unsigned int remainder, size_t npixels) { uint8_t indata; uint8_t outdata; + uint8_t nextdata; unsigned int outpixels = 0; unsigned int shift; @@ -255,10 +257,11 @@ nxgl_copyrun_2bpp(FAR const uint8_t *src, FAR uint8_t *dest, #elif NXGLIB_BITSPERPIXEL == 4 static inline void nxgl_copyrun_4bpp(FAR const uint8_t *src, FAR uint8_t *dest, - unsigned int inbit, size_t npixels) + unsigned int remainder, size_t npixels) { uint8_t indata; uint8_t outdata; + uint8_t nextdata; unsigned int outpixels = 0; DEBUGASSERT(remainder == 1); @@ -269,7 +272,6 @@ nxgl_copyrun_4bpp(FAR const uint8_t *src, FAR uint8_t *dest, */ indata = *src++; - shift = (remainder << 1); #ifdef CONFIG_NX_PACKEDMSFIRST /* If CONFIG_NX_PACKEDMSFIRST is defined, then bits 0-3 @@ -317,8 +319,8 @@ nxgl_copyrun_4bpp(FAR const uint8_t *src, FAR uint8_t *dest, * src = BBBB CCCC - nextdata = CCCC xxxx */ - outdata |= (indata >> 4); - nextdata = (indata << 4); + outdata |= (indata >> 4); + nextdata = (indata << 4); #else /* If CONFIG_NX_PACKEDMSFIRST is NOT defined, then bits 0-(remainder-1) * are carried over from that last pass through the loop (or are @@ -328,8 +330,8 @@ nxgl_copyrun_4bpp(FAR const uint8_t *src, FAR uint8_t *dest, * src = CCCC CCBB - nextdata = xxCC CCCC */ - outdata |= (indata << 4); - nextdata = (indata >> 4); + outdata |= (indata << 4); + nextdata = (indata >> 4); #endif /* Transfer the byte to the run buffer */ |