Marlin_Firmware/Marlin/src/lcd/extensible_ui/lib/lulzbot/compat.h

54 lines
2.0 KiB
C
Raw Normal View History

2019-08-16 18:34:13 -05: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 *
* location: <http://www.gnu.org/licenses/>. *
****************************************************************************/
#pragma once
/**
* This following provides compatibility whether compiling
* as a part of Marlin or outside it
*/
2019-08-24 01:42:38 -05:00
#ifdef __has_include
#if __has_include("../../ui_api.h")
2019-08-16 18:34:13 -05:00
#include "../../ui_api.h"
#endif
#else
#include "../../ui_api.h"
#endif
#ifdef __MARLIN_FIRMWARE__
2019-08-21 04:48:06 -05:00
// __MARLIN_FIRMWARE__ exists when compiled within Marlin.
#include "pin_mappings.h"
2019-08-16 18:34:13 -05:00
#else
// Messages that are declared in Marlin
2019-08-21 04:48:06 -05:00
#define WELCOME_MSG "Printer Ready"
#define MSG_MEDIA_INSERTED "Media Inserted"
#define MSG_MEDIA_REMOVED "Media Removed"
2019-08-16 18:34:13 -05:00
namespace UI {
static inline uint32_t safe_millis() {return millis();};
static inline void yield() {};
};
#endif
class __FlashStringHelper;
typedef const __FlashStringHelper *progmem_str;