aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2014-12-31 12:27:04 +1000
committerinmarket <andrewh@inmarket.com.au>2014-12-31 12:27:04 +1000
commita5b80da2077047ddee8e8c75d84b2d2b156f8f2d (patch)
treec3212b03b5a5ed805f0272108a692b539bd8ea5d /src
parent5c8f83ebc4bfb7b4dc292835f880063a9fdbf613 (diff)
downloaduGFX-a5b80da2077047ddee8e8c75d84b2d2b156f8f2d.tar.gz
uGFX-a5b80da2077047ddee8e8c75d84b2d2b156f8f2d.tar.bz2
uGFX-a5b80da2077047ddee8e8c75d84b2d2b156f8f2d.zip
Fix complaints with some ChibiOS versions and some compilers about TRUE/FALSE redefinition.
Diffstat (limited to 'src')
-rw-r--r--src/gos/gos_chibios.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/gos/gos_chibios.h b/src/gos/gos_chibios.h
index a3aba712..a4880c16 100644
--- a/src/gos/gos_chibios.h
+++ b/src/gos/gos_chibios.h
@@ -10,6 +10,11 @@
#if GFX_USE_OS_CHIBIOS
+// This shouldn't be needed but some people are complaining
+// about TRUE/FALSE redefinition so we fix it here.
+#undef TRUE
+#undef FALSE
+
#include "ch.h"
#include "hal.h"
@@ -28,6 +33,12 @@
* are already defined by ChibiOS
*/
+#if !defined(FALSE)
+ #define FALSE 0
+#endif
+#if !defined(TRUE)
+ #define TRUE -1
+#endif
#if CH_KERNEL_MAJOR == 3
typedef char bool_t;
#endif