mirror of
https://github.com/Bodmer/TFT_eSPI.git
synced 2025-08-01 11:44:43 +02:00
Move sketch tft_setup.h checking code
This commit is contained in:
18
TFT_eSPI.h
18
TFT_eSPI.h
@@ -39,6 +39,24 @@
|
||||
#ifdef CONFIG_TFT_eSPI_ESPIDF
|
||||
#include "TFT_config.h"
|
||||
#endif
|
||||
|
||||
// The following lines allow the user setup to be included in the sketch folder, see
|
||||
// "Sketch_with_tft_setup" generic example.
|
||||
#if !defined __has_include
|
||||
#if !defined(DISABLE_ALL_LIBRARY_WARNINGS)
|
||||
#warning Compiler does not support __has_include, so sketches cannot define the setup
|
||||
#endif
|
||||
#else
|
||||
#if __has_include(<tft_setup.h>)
|
||||
// Include the sketch setup file
|
||||
#include <tft_setup.h>
|
||||
#ifndef USER_SETUP_LOADED
|
||||
// Prevent loading further setups
|
||||
#define USER_SETUP_LOADED
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <User_Setup_Select.h>
|
||||
|
||||
// Handle FLASH based storage e.g. PROGMEM
|
||||
|
@@ -5,34 +5,22 @@
|
||||
// This makes selecting between hardware setups easy by "uncommenting" one line.
|
||||
|
||||
// The advantage of this hardware configuration method is that the examples provided
|
||||
// with the library should work with different setups immediately without any other
|
||||
// changes being needed. It also improves the portability of users sketches to other
|
||||
// hardware configurations and compatible libraries.
|
||||
// with the library should work with immediately without any other changes being
|
||||
// needed. It also improves the portability of users sketches to other hardware
|
||||
// configurations and compatible libraries.
|
||||
//
|
||||
// Create a shortcut to this file on your desktop to permit quick access for editing.
|
||||
// Re-compile and upload after making and saving any changes to this file.
|
||||
|
||||
// Customised User_Setup files are stored in the "User_Setups" folder.
|
||||
|
||||
// The following lines allow the user setup to be included in the sketch, see
|
||||
// "Sketch_with_tft_setup" generic example. Do not edit lines 19 to 32!
|
||||
#if !defined __has_include
|
||||
#if !defined(DISABLE_ALL_LIBRARY_WARNINGS)
|
||||
#warning Compiler does not support __has_include, so sketches cannot define the setup
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if __has_include(<tft_setup.h>)
|
||||
#include <tft_setup.h>
|
||||
#ifndef USER_SETUP_LOADED
|
||||
#define USER_SETUP_LOADED
|
||||
#endif
|
||||
#endif
|
||||
// It is also possible for the user tft settings to be included with the sketch, see
|
||||
// the "Sketch_with_tft_setup" generic example. This may be more convenient for
|
||||
// multiple projects.
|
||||
|
||||
#ifndef USER_SETUP_LOADED // Lets PlatformIO users define settings in
|
||||
// platformio.ini, see notes in "Tools" folder.
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////
|
||||
// User configuration selection lines are below //
|
||||
///////////////////////////////////////////////////////
|
||||
|
Reference in New Issue
Block a user