version 2.8
gadc_rules.h
Go to the documentation of this file.
1 /*
2  * This file is subject to the terms of the GFX License. If a copy of
3  * the license was not distributed with this file, you can obtain one at:
4  *
5  * http://ugfx.org/license.html
6  */
7 
8 /**
9  * @file src/gadc/gadc_rules.h
10  * @brief GADC safety rules header file.
11  *
12  * @addtogroup GADC
13  * @{
14  */
15 
16 #ifndef _GADC_RULES_H
17 #define _GADC_RULES_H
18 
19 #if GFX_USE_GADC
20  #if !GFX_USE_GTIMER
21  #if GFX_DISPLAY_RULE_WARNINGS
22  #if GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_DIRECT
23  #warning "GADC: GFX_USE_GTIMER is required if GFX_USE_GADC is TRUE. It has been turned on for you."
24  #elif GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_MACRO
25  COMPILER_WARNING("GADC: GFX_USE_GTIMER is required if GFX_USE_GADC is TRUE. It has been turned on for you.")
26  #endif
27  #endif
28  #undef GFX_USE_GTIMER
29  #define GFX_USE_GTIMER TRUE
30  #endif
31  #if !GFX_USE_GQUEUE || !GQUEUE_NEED_GSYNC || !GQUEUE_NEED_BUFFERS
32  #if GFX_DISPLAY_RULE_WARNINGS
33  #if GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_DIRECT
34  #warning "GADC: GFX_USE_GQUEUE, GQUEUE_NEED_BUFFERS and GQUEUE_NEED_GSYNC are required if GFX_USE_GADC is TRUE. They have been turned on for you."
35  #elif GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_MACRO
36  COMPILER_WARNING("GADC: GFX_USE_GQUEUE, GQUEUE_NEED_BUFFERS and GQUEUE_NEED_GSYNC are required if GFX_USE_GADC is TRUE. They have been turned on for you.")
37  #endif
38  #endif
39  #undef GFX_USE_GQUEUE
40  #define GFX_USE_GQUEUE TRUE
41  #undef GQUEUE_NEED_BUFFERS
42  #define GQUEUE_NEED_BUFFERS TRUE
43  #undef GQUEUE_NEED_GSYNC
44  #define GQUEUE_NEED_GSYNC TRUE
45  #endif
46 #endif
47 
48 #endif /* _GADC_RULES_H */
49 /** @} */