aboutsummaryrefslogtreecommitdiffstats
path: root/gfx.h
diff options
context:
space:
mode:
authorJoel Bodenmann <joel@seriouslyembedded.com>2015-11-07 16:54:10 +0100
committerJoel Bodenmann <joel@seriouslyembedded.com>2015-11-07 16:54:10 +0100
commitff01cc0212c951a2613f7ca5fb1e9579f17299cb (patch)
tree78bd97c1cf904f50da5d1694f1f8f788ec3594b3 /gfx.h
parent6397a56e0beddf179786e093b08bcf0cbe71fea1 (diff)
downloaduGFX-ff01cc0212c951a2613f7ca5fb1e9579f17299cb.tar.gz
uGFX-ff01cc0212c951a2613f7ca5fb1e9579f17299cb.tar.bz2
uGFX-ff01cc0212c951a2613f7ca5fb1e9579f17299cb.zip
Adding GFX_COMPILER_ARMCC and GFX_COMPILER_KEIL
Diffstat (limited to 'gfx.h')
-rw-r--r--gfx.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/gfx.h b/gfx.h
index 48a92770..9afb3256 100644
--- a/gfx.h
+++ b/gfx.h
@@ -35,7 +35,12 @@
* @brief Generic 'true' boolean constant.
*/
#if !defined(TRUE) || defined(__DOXYGEN__)
- #define TRUE -1
+ // Keil/ARMCC requires some special threatment. can probably be generalized to always be 1.
+ #if (GFX_COMPILER == GFX_COMPILER_ARMCC) || (GFX_COMPILER == GFX_COMPILER_KEIL)
+ #define TRUE 1
+ #else
+ #define TRUE -1
+ #endif
#endif
/**
@@ -57,7 +62,7 @@
#if GFX_NO_INLINE
#define GFXINLINE
#else
- #if defined(__KEIL__) || defined(__C51__)
+ #if (GFX_COMPILER == GFX_COMPILER_ARMCC) || (GFX_COMPILER == GFX_COMPILER_KEIL)
#define GFXINLINE __inline
#else
#define GFXINLINE inline