The official µGFX library repository.

gos_rules.h 1.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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/gos/gos_rules.h
  9. * @brief GOS safety rules header file.
  10. *
  11. * @addtogroup GOS
  12. * @{
  13. */
  14. #ifndef _GOS_RULES_H
  15. #define _GOS_RULES_H
  16. #if !GFX_USE_OS_CHIBIOS && !GFX_USE_OS_WIN32 && !GFX_USE_OS_LINUX && !GFX_USE_OS_OSX && !GFX_USE_OS_RAW32 && !GFX_USE_OS_FREERTOS && !GFX_USE_OS_ECOS && !GFX_USE_OS_RAWRTOS && !GFX_USE_OS_ARDUINO && !GFX_USE_OS_CMSIS && !GFX_USE_OS_KEIL && !GFX_USE_OS_NIOS && !GFX_USE_OS_QT
  17. #error "GOS: No operating system has been defined."
  18. #endif
  19. #if GFX_USE_OS_CHIBIOS + GFX_USE_OS_WIN32 + GFX_USE_OS_LINUX + GFX_USE_OS_OSX + GFX_USE_OS_RAW32 + GFX_USE_OS_FREERTOS + GFX_USE_OS_ECOS + GFX_USE_OS_RAWRTOS + GFX_USE_OS_ARDUINO + GFX_USE_OS_CMSIS + GFX_USE_OS_KEIL + GFX_USE_OS_NIOS + GFX_USE_OS_QT != 1 * TRUE
  20. #error "GOS: More than one operation system has been defined as TRUE."
  21. #endif
  22. #if GFX_FREERTOS_USE_TRACE && !GFX_USE_OS_FREERTOS
  23. #error "GOS: GFX_FREERTOS_USE_TRACE is only available for the FreeRTOS port."
  24. #endif
  25. #if GFX_EMULATE_MALLOC
  26. #if GFX_USE_OS_WIN32 || GFX_USE_OS_LINUX || GFX_USE_OS_OSX || GFX_USE_OS_ECOS || \
  27. (GFX_OS_HEAP_SIZE == 0 && (GFX_USE_OS_RAW32 || GFX_USE_OS_ARDUINO || GFX_USE_OS_CMSIS || GFX_USE_OS_KEIL))
  28. #if GFX_DISPLAY_RULE_WARNINGS
  29. #warning "GOS: Cannot emulate malloc as gfxAlloc() internally uses malloc on this platform"
  30. #endif
  31. #undef GFX_EMULATE_MALLOC
  32. #define GFX_EMULATE_MALLOC FALSE
  33. #endif
  34. #endif
  35. #endif /* _GOS_RULES_H */
  36. /** @} */