diff options
author | inmarket <andrewh@inmarket.com.au> | 2015-11-18 09:59:31 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2015-11-18 09:59:31 +1000 |
commit | d7e5c9f606f0abd5e62c0c4e5751a2035d541d50 (patch) | |
tree | fd715c675d68011de969d4ab2a306dafa4787a41 /src/gdisp/gdisp_image_support.h | |
parent | 461b0bf0910f061ee7871f0c9902981f9c1023d6 (diff) | |
download | uGFX-d7e5c9f606f0abd5e62c0c4e5751a2035d541d50.tar.gz uGFX-d7e5c9f606f0abd5e62c0c4e5751a2035d541d50.tar.bz2 uGFX-d7e5c9f606f0abd5e62c0c4e5751a2035d541d50.zip |
Fix endian macro's
Diffstat (limited to 'src/gdisp/gdisp_image_support.h')
-rw-r--r-- | src/gdisp/gdisp_image_support.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/gdisp/gdisp_image_support.h b/src/gdisp/gdisp_image_support.h index fee07e3b..a3cdc86f 100644 --- a/src/gdisp/gdisp_image_support.h +++ b/src/gdisp/gdisp_image_support.h @@ -32,16 +32,16 @@ * There is no alignment requirement. */ #if GFX_CPU_ENDIAN == GFX_CPU_ENDIAN_LITTLE && GFX_CPU_NO_ALIGNMENT_FAULTS - #define gidspImageGetLE16(p, idx) gdispImageGetVar(uint16_t, (p), (idx)) - #define gidspImageGetLE32(p, idx) gdispImageGetVar(uint32_t, (p), (idx)) + #define gdispImageGetLE16(p, idx) gdispImageGetVar(uint16_t, (p), (idx)) + #define gdispImageGetLE32(p, idx) gdispImageGetVar(uint32_t, (p), (idx)) #else #define gdispImageGetLE16(p, idx) ( gdispImageGetByte(uint16_t, (p), (idx) , 0) | gdispImageGetByte(uint16_t, (p), (idx)+1, 8)) #define gdispImageGetLE32(p, idx) ( gdispImageGetByte(uint32_t, (p), (idx) , 0) | gdispImageGetByte(uint32_t, (p), (idx)+1, 8)\ |gdispImageGetByte(uint32_t, (p), (idx)+2, 16) | gdispImageGetByte(uint32_t, (p), (idx)+3, 24)) #endif #if GFX_CPU_ENDIAN == GFX_CPU_ENDIAN_BIG && GFX_CPU_NO_ALIGNMENT_FAULTS - #define gidspImageGetBE16(p, idx) gdispImageGetVar(uint16_t, (p), (idx)) - #define gidspImageGetBE32(p, idx) gdispImageGetVar(uint32_t, (p), (idx)) + #define gdispImageGetBE16(p, idx) gdispImageGetVar(uint16_t, (p), (idx)) + #define gdispImageGetBE32(p, idx) gdispImageGetVar(uint32_t, (p), (idx)) #else #define gdispImageGetBE16(p, idx) ( gdispImageGetByte(uint16_t, (p), (idx) , 8) | gdispImageGetByte(uint16_t, (p), (idx)+1, 0)) #define gdispImageGetBE32(p, idx) ( gdispImageGetByte(uint32_t, (p), (idx) , 24) | gdispImageGetByte(uint32_t, (p), (idx)+1, 16)\ @@ -54,19 +54,19 @@ */ #if GFX_CPU_ENDIAN == GFX_CPU_ENDIAN_LITTLE #define gdispImageGetAlignedLE16(p, idx) gdispImageGetVar(uint16_t, (p), (idx)) - #define gdispImageGetAlignedBE16(p, idx) gidspImageGetBE16(p, (idx)) + #define gdispImageGetAlignedBE16(p, idx) gdispImageGetBE16(p, (idx)) #define gdispImageGetAlignedLE32(p, idx) gdispImageGetVar(uint32_t, (p), (idx)) - #define gdispImageGetAlignedBE32(p, idx) gidspImageGetBE32(p, (idx)) + #define gdispImageGetAlignedBE32(p, idx) gdispImageGetBE32(p, (idx)) #elif GFX_CPU_ENDIAN == GFX_CPU_ENDIAN_BIG - #define gdispImageGetAlignedLE16(p, idx) gidspImageGetLE16(p, (idx)) + #define gdispImageGetAlignedLE16(p, idx) gdispImageGetLE16(p, (idx)) #define gdispImageGetAlignedBE16(p, idx) gdispImageGetVar(uint16_t, (p), (idx)) - #define gdispImageGetAlignedLE32(p, idx) gidspImageGetLE32(p, (idx)) + #define gdispImageGetAlignedLE32(p, idx) gdispImageGetLE32(p, (idx)) #define gdispImageGetAlignedBE32(p, idx) gdispImageGetVar(uint32_t, (p), (idx)) #else - #define gdispImageGetAlignedLE16(p, idx) gidspImageGetLE16(p, (idx)) - #define gdispImageGetAlignedBE16(p, idx) gidspImageGetBE16(p, (idx)) - #define gdispImageGetAlignedLE32(p, idx) gidspImageGetLE32(p, (idx)) - #define gdispImageGetAlignedBE32(p, idx) gidspImageGetBE32(p, (idx)) + #define gdispImageGetAlignedLE16(p, idx) gdispImageGetLE16(p, (idx)) + #define gdispImageGetAlignedBE16(p, idx) gdispImageGetBE16(p, (idx)) + #define gdispImageGetAlignedLE32(p, idx) gdispImageGetLE32(p, (idx)) + #define gdispImageGetAlignedBE32(p, idx) gdispImageGetBE32(p, (idx)) #endif /* |