mirror of
https://github.com/Bodmer/TFT_eSPI.git
synced 2025-08-03 12:44:46 +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
|
#ifdef CONFIG_TFT_eSPI_ESPIDF
|
||||||
#include "TFT_config.h"
|
#include "TFT_config.h"
|
||||||
#endif
|
#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>
|
#include <User_Setup_Select.h>
|
||||||
|
|
||||||
// Handle FLASH based storage e.g. PROGMEM
|
// Handle FLASH based storage e.g. PROGMEM
|
||||||
|
@@ -5,34 +5,22 @@
|
|||||||
// This makes selecting between hardware setups easy by "uncommenting" one line.
|
// This makes selecting between hardware setups easy by "uncommenting" one line.
|
||||||
|
|
||||||
// The advantage of this hardware configuration method is that the examples provided
|
// The advantage of this hardware configuration method is that the examples provided
|
||||||
// with the library should work with different setups immediately without any other
|
// with the library should work with immediately without any other changes being
|
||||||
// changes being needed. It also improves the portability of users sketches to other
|
// needed. It also improves the portability of users sketches to other hardware
|
||||||
// hardware configurations and compatible libraries.
|
// configurations and compatible libraries.
|
||||||
//
|
//
|
||||||
// Create a shortcut to this file on your desktop to permit quick access for editing.
|
// 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.
|
// Re-compile and upload after making and saving any changes to this file.
|
||||||
|
|
||||||
// Customised User_Setup files are stored in the "User_Setups" folder.
|
// 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
|
// It is also possible for the user tft settings to be included with the sketch, see
|
||||||
// "Sketch_with_tft_setup" generic example. Do not edit lines 19 to 32!
|
// the "Sketch_with_tft_setup" generic example. This may be more convenient for
|
||||||
#if !defined __has_include
|
// multiple projects.
|
||||||
#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
|
|
||||||
|
|
||||||
#ifndef USER_SETUP_LOADED // Lets PlatformIO users define settings in
|
#ifndef USER_SETUP_LOADED // Lets PlatformIO users define settings in
|
||||||
// platformio.ini, see notes in "Tools" folder.
|
// platformio.ini, see notes in "Tools" folder.
|
||||||
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////
|
||||||
// User configuration selection lines are below //
|
// User configuration selection lines are below //
|
||||||
///////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////
|
||||||
|
Reference in New Issue
Block a user