From 461b0bf0910f061ee7871f0c9902981f9c1023d6 Mon Sep 17 00:00:00 2001 From: inmarket Date: Wed, 18 Nov 2015 09:59:11 +1000 Subject: More compiler specific stuff --- src/gmisc/gmisc.h | 2 +- src/gwin/gwin_class.h | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) (limited to 'src') diff --git a/src/gmisc/gmisc.h b/src/gmisc/gmisc.h index ebef8156..09fce40f 100644 --- a/src/gmisc/gmisc.h +++ b/src/gmisc/gmisc.h @@ -76,7 +76,7 @@ typedef int32_t fixed; * @brief The famous number pi */ #ifndef PI -#define PI 3.1415926535897932384626433832795028841971693993751 + #define PI 3.1415926535897932384626433832795028841971693993751 #endif /** diff --git a/src/gwin/gwin_class.h b/src/gwin/gwin_class.h index 041c9152..f2aa4df0 100644 --- a/src/gwin/gwin_class.h +++ b/src/gwin/gwin_class.h @@ -23,10 +23,6 @@ #if GFX_USE_GWIN || defined(__DOXYGEN__) -#if GFX_COMPILER == GFX_COMPILER_KEIL - #pragma anon_unions -#endif - /** * @brief The predefined flags for a Window * @{ -- cgit v1.2.3 From d7e5c9f606f0abd5e62c0c4e5751a2035d541d50 Mon Sep 17 00:00:00 2001 From: inmarket Date: Wed, 18 Nov 2015 09:59:31 +1000 Subject: Fix endian macro's --- src/gdisp/gdisp_image.c | 2 +- src/gdisp/gdisp_image_support.h | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/src/gdisp/gdisp_image.c b/src/gdisp/gdisp_image.c index 87d11065..0319030f 100644 --- a/src/gdisp/gdisp_image.c +++ b/src/gdisp/gdisp_image.c @@ -209,7 +209,7 @@ void gdispImageFree(gdispImage *img, void *ptr, size_t sz) { we.w = w; return (((uint16_t)we.b[0]))|(((uint16_t)we.b[1]) << 8); } - uint16_t gdispImageH16toBE16(uint16_t dw) { + uint16_t gdispImageH16toBE16(uint16_t w) { union wbyteorder_u we; we.w = w; 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 /* -- cgit v1.2.3