µGFX library fork

gadc_rules.h 1.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. * @file src/gadc/gadc_rules.h
  9. * @brief GADC safety rules header file.
  10. *
  11. * @addtogroup GADC
  12. * @{
  13. */
  14. #ifndef _GADC_RULES_H
  15. #define _GADC_RULES_H
  16. #if GFX_USE_GADC
  17. #if !GFX_USE_GTIMER
  18. #if GFX_DISPLAY_RULE_WARNINGS
  19. #if GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_DIRECT
  20. #warning "GADC: GFX_USE_GTIMER is required if GFX_USE_GADC is TRUE. It has been turned on for you."
  21. #elif GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_MACRO
  22. COMPILER_WARNING("GADC: GFX_USE_GTIMER is required if GFX_USE_GADC is TRUE. It has been turned on for you.")
  23. #endif
  24. #endif
  25. #undef GFX_USE_GTIMER
  26. #define GFX_USE_GTIMER TRUE
  27. #endif
  28. #if !GFX_USE_GQUEUE || !GQUEUE_NEED_GSYNC || !GQUEUE_NEED_BUFFERS
  29. #if GFX_DISPLAY_RULE_WARNINGS
  30. #if GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_DIRECT
  31. #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."
  32. #elif GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_MACRO
  33. 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.")
  34. #endif
  35. #endif
  36. #undef GFX_USE_GQUEUE
  37. #define GFX_USE_GQUEUE TRUE
  38. #undef GQUEUE_NEED_BUFFERS
  39. #define GQUEUE_NEED_BUFFERS TRUE
  40. #undef GQUEUE_NEED_GSYNC
  41. #define GQUEUE_NEED_GSYNC TRUE
  42. #endif
  43. #endif
  44. #endif /* _GADC_RULES_H */
  45. /** @} */