2014-02-18 14:36:52 +00:00
|
|
|
/*
|
|
|
|
* This file is subject to the terms of the GFX License. If a copy of
|
|
|
|
* the license was not distributed with this file, you can obtain one at:
|
|
|
|
*
|
|
|
|
* http://ugfx.org/license.html
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
2015-01-21 07:26:24 +00:00
|
|
|
* @file src/gos/gos_rules.h
|
2014-02-18 14:36:52 +00:00
|
|
|
* @brief GOS safety rules header file.
|
|
|
|
*
|
|
|
|
* @addtogroup GOS
|
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _GOS_RULES_H
|
|
|
|
#define _GOS_RULES_H
|
|
|
|
|
2016-07-18 23:30:20 +00:00
|
|
|
#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
|
2015-12-13 10:40:59 +00:00
|
|
|
#error "GOS: No operating system has been defined."
|
2014-02-18 14:36:52 +00:00
|
|
|
#endif
|
2014-05-10 16:13:51 +00:00
|
|
|
|
2016-07-18 23:30:20 +00:00
|
|
|
#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
|
2014-02-18 14:36:52 +00:00
|
|
|
#error "GOS: More than one operation system has been defined as TRUE."
|
|
|
|
#endif
|
|
|
|
|
2014-05-10 16:13:51 +00:00
|
|
|
#if GFX_FREERTOS_USE_TRACE && !GFX_USE_OS_FREERTOS
|
|
|
|
#error "GOS: GFX_FREERTOS_USE_TRACE is only available for the FreeRTOS port."
|
|
|
|
#endif
|
|
|
|
|
2015-11-27 00:15:46 +00:00
|
|
|
#if GFX_EMULATE_MALLOC
|
|
|
|
#if GFX_USE_OS_WIN32 || GFX_USE_OS_LINUX || GFX_USE_OS_OSX || GFX_USE_OS_ECOS || \
|
|
|
|
(GFX_OS_HEAP_SIZE == 0 && (GFX_USE_OS_RAW32 || GFX_USE_OS_ARDUINO || GFX_USE_OS_CMSIS || GFX_USE_OS_KEIL))
|
|
|
|
#if GFX_DISPLAY_RULE_WARNINGS
|
2017-06-30 09:43:51 +00:00
|
|
|
#if GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_DIRECT
|
|
|
|
#warning "GOS: Cannot emulate malloc as gfxAlloc() internally uses malloc on this platform"
|
|
|
|
#elif GFX_COMPILER_WARNING_TYPE == GFX_COMPILER_WARNING_MACRO
|
|
|
|
COMPILER_WARNING("GOS: Cannot emulate malloc as gfxAlloc() internally uses malloc on this platform")
|
|
|
|
#endif
|
2015-11-27 00:15:46 +00:00
|
|
|
#endif
|
|
|
|
#undef GFX_EMULATE_MALLOC
|
|
|
|
#define GFX_EMULATE_MALLOC FALSE
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2014-02-18 14:36:52 +00:00
|
|
|
#endif /* _GOS_RULES_H */
|
|
|
|
/** @} */
|