You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
54 lines
2.0 KiB
54 lines
2.0 KiB
5 years ago
|
/************
|
||
|
* 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 *
|
||
4 years ago
|
* location: <https://www.gnu.org/licenses/>. *
|
||
5 years ago
|
****************************************************************************/
|
||
|
|
||
|
#pragma once
|
||
|
|
||
|
/**
|
||
|
* This following provides compatibility whether compiling
|
||
|
* as a part of Marlin or outside it
|
||
|
*/
|
||
|
|
||
5 years ago
|
#ifdef __has_include
|
||
3 years ago
|
#if __has_include("../ui_api.h")
|
||
|
#include "../ui_api.h"
|
||
5 years ago
|
#endif
|
||
|
#else
|
||
3 years ago
|
#include "../ui_api.h"
|
||
5 years ago
|
#endif
|
||
|
|
||
|
#ifdef __MARLIN_FIRMWARE__
|
||
5 years ago
|
// __MARLIN_FIRMWARE__ exists when compiled within Marlin.
|
||
|
#include "pin_mappings.h"
|
||
4 years ago
|
#undef max
|
||
|
#define max(a,b) ((a)>(b)?(a):(b))
|
||
|
#undef min
|
||
|
#define min(a,b) ((a)<(b)?(a):(b))
|
||
5 years ago
|
#else
|
||
|
namespace UI {
|
||
3 years ago
|
static inline uint32_t safe_millis() { return millis(); }
|
||
|
static inline void yield() {}
|
||
5 years ago
|
};
|
||
|
#endif
|
||
|
|
||
|
class __FlashStringHelper;
|
||
|
typedef const __FlashStringHelper *progmem_str;
|
||
3 years ago
|
extern const char G28_STR[];
|