aboutsummaryrefslogtreecommitdiffstats
path: root/include/gfx_rules.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/gfx_rules.h')
-rw-r--r--include/gfx_rules.h68
1 files changed, 44 insertions, 24 deletions
diff --git a/include/gfx_rules.h b/include/gfx_rules.h
index b93ea8ae..4fff2d21 100644
--- a/include/gfx_rules.h
+++ b/include/gfx_rules.h
@@ -22,28 +22,51 @@
* These are defined in the order of their inter-dependancies.
*/
+#ifndef GFX_DISPLAY_RULE_WARNINGS
+ #define GFX_DISPLAY_RULE_WARNINGS FALSE
+#endif
+
+#if !GFX_USE_OS_CHIBIOS && !GFX_USE_OS_WIN32 && !GFX_USE_OS_POSIX
+ #if GFX_DISPLAY_RULE_WARNINGS
+ #warning "GOS: No Operating System has been defined. ChibiOS (GFX_USE_OS_CHIBIOS) has been turned on for you."
+ #endif
+ #undef GFX_USE_OS_CHIBIOS
+ #define GFX_USE_OS_CHIBIOS TRUE
+#endif
+#if GFX_USE_OS_CHIBIOS + GFX_USE_OS_WIN32 + GFX_USE_OS_POSIX != 1 * TRUE
+ #error "GOS: More than one operation system has been defined as TRUE."
+#endif
+
#if GFX_USE_GWIN
#if !GFX_USE_GDISP
#error "GWIN: GFX_USE_GDISP must be TRUE when using GWIN"
#endif
#if !GDISP_NEED_CLIP
- #warning "GWIN: Drawing can occur outside the defined windows as GDISP_NEED_CLIP is FALSE"
+ #if GFX_DISPLAY_RULE_WARNINGS
+ #warning "GWIN: Drawing can occur outside the defined windows as GDISP_NEED_CLIP is FALSE"
+ #endif
#endif
#if GWIN_NEED_BUTTON
#if !GDISP_NEED_TEXT
#error "GWIN: GDISP_NEED_TEXT is required if GWIN_NEED_BUTTON is TRUE."
#endif
#if !GFX_USE_GEVENT
- #warning "GWIN: GFX_USE_GEVENT is required if GWIN_NEED_BUTTON is TRUE. It has been turned on for you."
+ #if GFX_DISPLAY_RULE_WARNINGS
+ #warning "GWIN: GFX_USE_GEVENT is required if GWIN_NEED_BUTTON is TRUE. It has been turned on for you."
+ #endif
#undef GFX_USE_GEVENT
#define GFX_USE_GEVENT TRUE
#endif
#if !GFX_USE_GINPUT || !(GINPUT_NEED_MOUSE || GINPUT_NEED_TOGGLE)
- #warning "GWIN: You have set GWIN_NEED_BUTTON to TRUE but no supported GINPUT (mouse/toggle) devices have been included"
+ #if GFX_DISPLAY_RULE_WARNINGS
+ #warning "GWIN: You have set GWIN_NEED_BUTTON to TRUE but no supported GINPUT (mouse/toggle) devices have been included"
+ #endif
#endif
#if !GDISP_NEED_MULTITHREAD && !GDISP_NEED_ASYNC
- #warning "GWIN: Either GDISP_NEED_MULTITHREAD or GDISP_NEED_ASYNC is required if GWIN_NEED_BUTTON is TRUE."
- #warning "GWIN: GDISP_NEED_MULTITHREAD has been turned on for you."
+ #if GFX_DISPLAY_RULE_WARNINGS
+ #warning "GWIN: Either GDISP_NEED_MULTITHREAD or GDISP_NEED_ASYNC is required if GWIN_NEED_BUTTON is TRUE."
+ #warning "GWIN: GDISP_NEED_MULTITHREAD has been turned on for you."
+ #endif
#undef GDISP_NEED_MULTITHREAD
#define GDISP_NEED_MULTITHREAD TRUE
#endif
@@ -59,12 +82,16 @@
#if GFX_USE_GINPUT
#if !GFX_USE_GEVENT
- #warning "GINPUT: GFX_USE_GEVENT is required if GFX_USE_GINPUT is TRUE. It has been turned on for you."
+ #if GFX_DISPLAY_RULE_WARNINGS
+ #warning "GINPUT: GFX_USE_GEVENT is required if GFX_USE_GINPUT is TRUE. It has been turned on for you."
+ #endif
#undef GFX_USE_GEVENT
#define GFX_USE_GEVENT TRUE
#endif
#if !GFX_USE_GTIMER
- #warning "GINPUT: GFX_USE_GTIMER is required if GFX_USE_GINPUT is TRUE. It has been turned on for you."
+ #if GFX_DISPLAY_RULE_WARNINGS
+ #warning "GINPUT: GFX_USE_GTIMER is required if GFX_USE_GINPUT is TRUE. It has been turned on for you."
+ #endif
#undef GFX_USE_GTIMER
#define GFX_USE_GTIMER TRUE
#endif
@@ -74,13 +101,6 @@
#if GDISP_NEED_MULTITHREAD && GDISP_NEED_ASYNC
#error "GDISP: Only one of GDISP_NEED_MULTITHREAD and GDISP_NEED_ASYNC should be defined."
#endif
- #if GDISP_NEED_ASYNC
- #if !GDISP_NEED_MSGAPI
- #warning "GDISP: Messaging API is required for Async Multi-Thread. It has been turned on for you."
- #undef GDISP_NEED_MSGAPI
- #define GDISP_NEED_MSGAPI TRUE
- #endif
- #endif
#endif
#if GFX_USE_TDISP
@@ -88,33 +108,33 @@
#if GFX_USE_GAUDIN
#if GFX_USE_GEVENT && !GFX_USE_GTIMER
- #warning "GAUDIN: GFX_USE_GTIMER is required if GFX_USE_GAUDIN and GFX_USE_GEVENT are TRUE. It has been turned on for you."
+ #if GFX_DISPLAY_RULE_WARNINGS
+ #warning "GAUDIN: GFX_USE_GTIMER is required if GFX_USE_GAUDIN and GFX_USE_GEVENT are TRUE. It has been turned on for you."
+ #endif
#undef GFX_USE_GTIMER
#define GFX_USE_GTIMER TRUE
#endif
#endif
#if GFX_USE_GADC
- #if !CH_USE_MUTEXES || !CH_USE_SEMAPHORES
- #error "GADC: CH_USE_MUTEXES and CH_USE_SEMAPHORES must be defined in chconf.h"
- #endif
#if !GFX_USE_GTIMER
- #warning "GADC: GFX_USE_GTIMER is required if GFX_USE_GADC is TRUE. It has been turned on for you."
+ #if GFX_DISPLAY_RULE_WARNINGS
+ #warning "GADC: GFX_USE_GTIMER is required if GFX_USE_GADC is TRUE. It has been turned on for you."
+ #endif
#undef GFX_USE_GTIMER
#define GFX_USE_GTIMER TRUE
#endif
#endif
#if GFX_USE_GEVENT
- #if !CH_USE_MUTEXES || !CH_USE_SEMAPHORES
- #error "GEVENT: CH_USE_MUTEXES and CH_USE_SEMAPHORES must be defined in chconf.h"
- #endif
#endif
#if GFX_USE_GTIMER
#if GFX_USE_GDISP && !GDISP_NEED_MULTITHREAD && !GDISP_NEED_ASYNC
- #warning "GTIMER: Neither GDISP_NEED_MULTITHREAD nor GDISP_NEED_ASYNC has been specified."
- #warning "GTIMER: Make sure you are not performing any GDISP/GWIN drawing operations in the timer callback!"
+ #if GFX_DISPLAY_RULE_WARNINGS
+ #warning "GTIMER: Neither GDISP_NEED_MULTITHREAD nor GDISP_NEED_ASYNC has been specified."
+ #warning "GTIMER: Make sure you are not performing any GDISP/GWIN drawing operations in the timer callback!"
+ #endif
#endif
#endif