1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-12-14 06:21:44 +00:00
MarlinFirmware/Marlin/src/lcd/extui/ftdi_eve_touch_ui/compat.h

54 lines
2.0 KiB
C
Raw Normal View History

2019-08-16 23:34:13 +00:00
/************
* compat.h *
************/
/****************************************************************************
* Written By Marcio Teixeira 2018 - Aleph Objects, Inc. *
* *
* This program is free software: you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation, either version 3 of the License, or *
* (at your option) any later version. *
* *
* This program is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU General Public License for more details. *
* *
* To view a copy of the GNU General Public License, go to the following *
2020-11-07 01:09:29 +00:00
* location: <https://www.gnu.org/licenses/>. *
2019-08-16 23:34:13 +00:00
****************************************************************************/
#pragma once
/**
* This following provides compatibility whether compiling
* as a part of Marlin or outside it
*/
2019-08-24 06:42:38 +00:00
#ifdef __has_include
#if __has_include("../ui_api.h")
#include "../ui_api.h"
2019-08-16 23:34:13 +00:00
#endif
#else
#include "../ui_api.h"
2019-08-16 23:34:13 +00:00
#endif
#ifdef __MARLIN_FIRMWARE__
2019-08-21 09:48:06 +00:00
// __MARLIN_FIRMWARE__ exists when compiled within Marlin.
#include "pin_mappings.h"
2020-02-14 13:18:57 +00:00
#undef max
#define max(a,b) ((a)>(b)?(a):(b))
#undef min
#define min(a,b) ((a)<(b)?(a):(b))
2019-08-16 23:34:13 +00:00
#else
namespace UI {
static inline uint32_t safe_millis() { return millis(); }
static inline void yield() {}
2019-08-16 23:34:13 +00:00
};
#endif
class __FlashStringHelper;
typedef const __FlashStringHelper *progmem_str;
2021-01-30 05:41:45 +00:00
extern const char G28_STR[];