diff options
Diffstat (limited to 'src/gdisp/gdisp_image_support.h')
-rw-r--r-- | src/gdisp/gdisp_image_support.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/gdisp/gdisp_image_support.h b/src/gdisp/gdisp_image_support.h index a3cdc86f..9fefd3d6 100644 --- a/src/gdisp/gdisp_image_support.h +++ b/src/gdisp/gdisp_image_support.h @@ -21,11 +21,11 @@ #define gdispImageGetVar(type, p, idx) (*(type *)(((uint8_t *)(p))+(idx))) #define gdispImageGetByte(type, p, idx, shift) (((type)gdispImageGetVar(uint8_t, p, idx))<<(shift)) #define gdispImageSwap16(w) ((((uint16_t)(w))>>8)|(((uint16_t)(w))<<8)) -#define gdispImageSwap32(dw) ((((uint32_t)(w))>>24)|((((uint32_t)(w))&0x00FF0000)>>8)\ - |((((uint32_t)(w))&0x0000FF00)<<8)|(((uint32_t)(w))<<24)) -#define gdispImageSwapWords32(dw) ((((uint32_t)(w))>>16)|(((uint32_t)(w))<<16)) -#define gdispImageSwapBytes32(dw) (((((uint32_t)(w))&0xFF000000)>>8)|((((uint32_t)(w))&0x00FF0000)<<8)\ - |((((uint32_t)(w))&0x0000FF00)>>8)|(((uint32_t)(w))<<8)) +#define gdispImageSwap32(dw) ((((uint32_t)(dw))>>24)|((((uint32_t)(dw))&0x00FF0000)>>8)\ + |((((uint32_t)(dw))&0x0000FF00)<<8)|(((uint32_t)(dw))<<24)) +#define gdispImageSwapWords32(dw) ((((uint32_t)(dw))>>16)|(((uint32_t)(dw))<<16)) +#define gdispImageSwapBytes32(dw) (((((uint32_t)(dw))&0xFF000000)>>8)|((((uint32_t)(dw))&0x00FF0000)<<8)\ + |((((uint32_t)(dw))&0x0000FF00)>>8)|(((uint32_t)(dw))<<8)) /* * Get a uint16_t/uint32_t from memory in the required endianness. @@ -120,7 +120,6 @@ #endif - #ifdef __cplusplus extern "C" { #endif |