From 87d3b4f56ba561d42f6af1f249e69839c4140e0e Mon Sep 17 00:00:00 2001 From: Fede85 Date: Wed, 3 Jul 2013 16:25:45 +0200 Subject: [PATCH] TFT library to new format --- .../Arduino/TFTBitmapLogo/TFTBitmapLogo.ino | 0 .../TFT/examples/Arduino/TFTBitmapLogo/arduino.bmp | Bin .../Arduino/TFTColorPicker/TFTColorPicker.ino | 0 .../Arduino/TFTDisplayText/TFTDisplayText.ino | 0 .../Arduino/TFTEtchASketch/TFTEtchASketch.ino | 0 .../TFT/examples/Arduino/TFTGraph/TFTGraph.ino | 0 .../TFT/examples/Arduino/TFTPong/TFTPong.ino | 0 .../EsploraTFTBitmapLogo/EsploraTFTBitmapLogo.ino | 0 .../Esplora/EsploraTFTBitmapLogo/arduino.bmp | Bin .../EsploraTFTColorPicker/EsploraTFTColorPicker.ino | 0 .../EsploraTFTEtchASketch/EsploraTFTEtchASketch.ino | 0 .../Esplora/EsploraTFTGraph/EsploraTFTGraph.ino | 0 .../Esplora/EsploraTFTHorizon/EsploraTFTHorizon.ino | 0 .../Esplora/EsploraTFTPong/EsploraTFTPong.ino | 0 .../Esplora/EsploraTFTTemp/EsploraTFTTemp.ino | 0 .../TFT/extras}/Adafruit-README.txt | 0 .../TFT/extras}/Adafruit-license.txt | 0 .../TFT => libraries/TFT/extras}/README.md | 0 .../avr/libraries => libraries}/TFT/keywords.txt | 0 libraries/TFT/library.properties | 10 ++++++++++ .../avr/libraries/TFT => libraries/TFT/src}/TFT.cpp | 2 +- .../avr/libraries/TFT => libraries/TFT/src}/TFT.h | 2 +- .../TFT/src}/utility/Adafruit_GFX.cpp | 0 .../TFT/src}/utility/Adafruit_GFX.h | 0 .../TFT/src}/utility/Adafruit_ST7735.cpp | 0 .../TFT/src}/utility/Adafruit_ST7735.h | 2 +- .../TFT => libraries/TFT/src}/utility/PImage.h | 0 .../TFT => libraries/TFT/src}/utility/glcdfont.c | 0 .../TFT => libraries/TFT/src}/utility/keywords.txt | 0 29 files changed, 13 insertions(+), 3 deletions(-) rename {hardware/arduino/avr/libraries => libraries}/TFT/examples/Arduino/TFTBitmapLogo/TFTBitmapLogo.ino (100%) rename {hardware/arduino/avr/libraries => libraries}/TFT/examples/Arduino/TFTBitmapLogo/arduino.bmp (100%) rename {hardware/arduino/avr/libraries => libraries}/TFT/examples/Arduino/TFTColorPicker/TFTColorPicker.ino (100%) rename {hardware/arduino/avr/libraries => libraries}/TFT/examples/Arduino/TFTDisplayText/TFTDisplayText.ino (100%) rename {hardware/arduino/avr/libraries => libraries}/TFT/examples/Arduino/TFTEtchASketch/TFTEtchASketch.ino (100%) rename {hardware/arduino/avr/libraries => libraries}/TFT/examples/Arduino/TFTGraph/TFTGraph.ino (100%) rename {hardware/arduino/avr/libraries => libraries}/TFT/examples/Arduino/TFTPong/TFTPong.ino (100%) rename {hardware/arduino/avr/libraries => libraries}/TFT/examples/Esplora/EsploraTFTBitmapLogo/EsploraTFTBitmapLogo.ino (100%) rename {hardware/arduino/avr/libraries => libraries}/TFT/examples/Esplora/EsploraTFTBitmapLogo/arduino.bmp (100%) rename {hardware/arduino/avr/libraries => libraries}/TFT/examples/Esplora/EsploraTFTColorPicker/EsploraTFTColorPicker.ino (100%) rename {hardware/arduino/avr/libraries => libraries}/TFT/examples/Esplora/EsploraTFTEtchASketch/EsploraTFTEtchASketch.ino (100%) rename {hardware/arduino/avr/libraries => libraries}/TFT/examples/Esplora/EsploraTFTGraph/EsploraTFTGraph.ino (100%) rename {hardware/arduino/avr/libraries => libraries}/TFT/examples/Esplora/EsploraTFTHorizon/EsploraTFTHorizon.ino (100%) rename {hardware/arduino/avr/libraries => libraries}/TFT/examples/Esplora/EsploraTFTPong/EsploraTFTPong.ino (100%) rename {hardware/arduino/avr/libraries => libraries}/TFT/examples/Esplora/EsploraTFTTemp/EsploraTFTTemp.ino (100%) rename {hardware/arduino/avr/libraries/TFT/utility => libraries/TFT/extras}/Adafruit-README.txt (100%) rename {hardware/arduino/avr/libraries/TFT/utility => libraries/TFT/extras}/Adafruit-license.txt (100%) rename {hardware/arduino/avr/libraries/TFT => libraries/TFT/extras}/README.md (100%) rename {hardware/arduino/avr/libraries => libraries}/TFT/keywords.txt (100%) create mode 100644 libraries/TFT/library.properties rename {hardware/arduino/avr/libraries/TFT => libraries/TFT/src}/TFT.cpp (83%) rename {hardware/arduino/avr/libraries/TFT => libraries/TFT/src}/TFT.h (89%) rename {hardware/arduino/avr/libraries/TFT => libraries/TFT/src}/utility/Adafruit_GFX.cpp (100%) rename {hardware/arduino/avr/libraries/TFT => libraries/TFT/src}/utility/Adafruit_GFX.h (100%) rename {hardware/arduino/avr/libraries/TFT => libraries/TFT/src}/utility/Adafruit_ST7735.cpp (100%) rename {hardware/arduino/avr/libraries/TFT => libraries/TFT/src}/utility/Adafruit_ST7735.h (99%) rename {hardware/arduino/avr/libraries/TFT => libraries/TFT/src}/utility/PImage.h (100%) rename {hardware/arduino/avr/libraries/TFT => libraries/TFT/src}/utility/glcdfont.c (100%) rename {hardware/arduino/avr/libraries/TFT => libraries/TFT/src}/utility/keywords.txt (100%) diff --git a/hardware/arduino/avr/libraries/TFT/examples/Arduino/TFTBitmapLogo/TFTBitmapLogo.ino b/libraries/TFT/examples/Arduino/TFTBitmapLogo/TFTBitmapLogo.ino similarity index 100% rename from hardware/arduino/avr/libraries/TFT/examples/Arduino/TFTBitmapLogo/TFTBitmapLogo.ino rename to libraries/TFT/examples/Arduino/TFTBitmapLogo/TFTBitmapLogo.ino diff --git a/hardware/arduino/avr/libraries/TFT/examples/Arduino/TFTBitmapLogo/arduino.bmp b/libraries/TFT/examples/Arduino/TFTBitmapLogo/arduino.bmp similarity index 100% rename from hardware/arduino/avr/libraries/TFT/examples/Arduino/TFTBitmapLogo/arduino.bmp rename to libraries/TFT/examples/Arduino/TFTBitmapLogo/arduino.bmp diff --git a/hardware/arduino/avr/libraries/TFT/examples/Arduino/TFTColorPicker/TFTColorPicker.ino b/libraries/TFT/examples/Arduino/TFTColorPicker/TFTColorPicker.ino similarity index 100% rename from hardware/arduino/avr/libraries/TFT/examples/Arduino/TFTColorPicker/TFTColorPicker.ino rename to libraries/TFT/examples/Arduino/TFTColorPicker/TFTColorPicker.ino diff --git a/hardware/arduino/avr/libraries/TFT/examples/Arduino/TFTDisplayText/TFTDisplayText.ino b/libraries/TFT/examples/Arduino/TFTDisplayText/TFTDisplayText.ino similarity index 100% rename from hardware/arduino/avr/libraries/TFT/examples/Arduino/TFTDisplayText/TFTDisplayText.ino rename to libraries/TFT/examples/Arduino/TFTDisplayText/TFTDisplayText.ino diff --git a/hardware/arduino/avr/libraries/TFT/examples/Arduino/TFTEtchASketch/TFTEtchASketch.ino b/libraries/TFT/examples/Arduino/TFTEtchASketch/TFTEtchASketch.ino similarity index 100% rename from hardware/arduino/avr/libraries/TFT/examples/Arduino/TFTEtchASketch/TFTEtchASketch.ino rename to libraries/TFT/examples/Arduino/TFTEtchASketch/TFTEtchASketch.ino diff --git a/hardware/arduino/avr/libraries/TFT/examples/Arduino/TFTGraph/TFTGraph.ino b/libraries/TFT/examples/Arduino/TFTGraph/TFTGraph.ino similarity index 100% rename from hardware/arduino/avr/libraries/TFT/examples/Arduino/TFTGraph/TFTGraph.ino rename to libraries/TFT/examples/Arduino/TFTGraph/TFTGraph.ino diff --git a/hardware/arduino/avr/libraries/TFT/examples/Arduino/TFTPong/TFTPong.ino b/libraries/TFT/examples/Arduino/TFTPong/TFTPong.ino similarity index 100% rename from hardware/arduino/avr/libraries/TFT/examples/Arduino/TFTPong/TFTPong.ino rename to libraries/TFT/examples/Arduino/TFTPong/TFTPong.ino diff --git a/hardware/arduino/avr/libraries/TFT/examples/Esplora/EsploraTFTBitmapLogo/EsploraTFTBitmapLogo.ino b/libraries/TFT/examples/Esplora/EsploraTFTBitmapLogo/EsploraTFTBitmapLogo.ino similarity index 100% rename from hardware/arduino/avr/libraries/TFT/examples/Esplora/EsploraTFTBitmapLogo/EsploraTFTBitmapLogo.ino rename to libraries/TFT/examples/Esplora/EsploraTFTBitmapLogo/EsploraTFTBitmapLogo.ino diff --git a/hardware/arduino/avr/libraries/TFT/examples/Esplora/EsploraTFTBitmapLogo/arduino.bmp b/libraries/TFT/examples/Esplora/EsploraTFTBitmapLogo/arduino.bmp similarity index 100% rename from hardware/arduino/avr/libraries/TFT/examples/Esplora/EsploraTFTBitmapLogo/arduino.bmp rename to libraries/TFT/examples/Esplora/EsploraTFTBitmapLogo/arduino.bmp diff --git a/hardware/arduino/avr/libraries/TFT/examples/Esplora/EsploraTFTColorPicker/EsploraTFTColorPicker.ino b/libraries/TFT/examples/Esplora/EsploraTFTColorPicker/EsploraTFTColorPicker.ino similarity index 100% rename from hardware/arduino/avr/libraries/TFT/examples/Esplora/EsploraTFTColorPicker/EsploraTFTColorPicker.ino rename to libraries/TFT/examples/Esplora/EsploraTFTColorPicker/EsploraTFTColorPicker.ino diff --git a/hardware/arduino/avr/libraries/TFT/examples/Esplora/EsploraTFTEtchASketch/EsploraTFTEtchASketch.ino b/libraries/TFT/examples/Esplora/EsploraTFTEtchASketch/EsploraTFTEtchASketch.ino similarity index 100% rename from hardware/arduino/avr/libraries/TFT/examples/Esplora/EsploraTFTEtchASketch/EsploraTFTEtchASketch.ino rename to libraries/TFT/examples/Esplora/EsploraTFTEtchASketch/EsploraTFTEtchASketch.ino diff --git a/hardware/arduino/avr/libraries/TFT/examples/Esplora/EsploraTFTGraph/EsploraTFTGraph.ino b/libraries/TFT/examples/Esplora/EsploraTFTGraph/EsploraTFTGraph.ino similarity index 100% rename from hardware/arduino/avr/libraries/TFT/examples/Esplora/EsploraTFTGraph/EsploraTFTGraph.ino rename to libraries/TFT/examples/Esplora/EsploraTFTGraph/EsploraTFTGraph.ino diff --git a/hardware/arduino/avr/libraries/TFT/examples/Esplora/EsploraTFTHorizon/EsploraTFTHorizon.ino b/libraries/TFT/examples/Esplora/EsploraTFTHorizon/EsploraTFTHorizon.ino similarity index 100% rename from hardware/arduino/avr/libraries/TFT/examples/Esplora/EsploraTFTHorizon/EsploraTFTHorizon.ino rename to libraries/TFT/examples/Esplora/EsploraTFTHorizon/EsploraTFTHorizon.ino diff --git a/hardware/arduino/avr/libraries/TFT/examples/Esplora/EsploraTFTPong/EsploraTFTPong.ino b/libraries/TFT/examples/Esplora/EsploraTFTPong/EsploraTFTPong.ino similarity index 100% rename from hardware/arduino/avr/libraries/TFT/examples/Esplora/EsploraTFTPong/EsploraTFTPong.ino rename to libraries/TFT/examples/Esplora/EsploraTFTPong/EsploraTFTPong.ino diff --git a/hardware/arduino/avr/libraries/TFT/examples/Esplora/EsploraTFTTemp/EsploraTFTTemp.ino b/libraries/TFT/examples/Esplora/EsploraTFTTemp/EsploraTFTTemp.ino similarity index 100% rename from hardware/arduino/avr/libraries/TFT/examples/Esplora/EsploraTFTTemp/EsploraTFTTemp.ino rename to libraries/TFT/examples/Esplora/EsploraTFTTemp/EsploraTFTTemp.ino diff --git a/hardware/arduino/avr/libraries/TFT/utility/Adafruit-README.txt b/libraries/TFT/extras/Adafruit-README.txt similarity index 100% rename from hardware/arduino/avr/libraries/TFT/utility/Adafruit-README.txt rename to libraries/TFT/extras/Adafruit-README.txt diff --git a/hardware/arduino/avr/libraries/TFT/utility/Adafruit-license.txt b/libraries/TFT/extras/Adafruit-license.txt similarity index 100% rename from hardware/arduino/avr/libraries/TFT/utility/Adafruit-license.txt rename to libraries/TFT/extras/Adafruit-license.txt diff --git a/hardware/arduino/avr/libraries/TFT/README.md b/libraries/TFT/extras/README.md similarity index 100% rename from hardware/arduino/avr/libraries/TFT/README.md rename to libraries/TFT/extras/README.md diff --git a/hardware/arduino/avr/libraries/TFT/keywords.txt b/libraries/TFT/keywords.txt similarity index 100% rename from hardware/arduino/avr/libraries/TFT/keywords.txt rename to libraries/TFT/keywords.txt diff --git a/libraries/TFT/library.properties b/libraries/TFT/library.properties new file mode 100644 index 000000000..09b470928 --- /dev/null +++ b/libraries/TFT/library.properties @@ -0,0 +1,10 @@ +name=TFT +author=Adafruit/Arduino +email=info@arduino.cc +sentence=With this library you can write, draw and display images on TFT displays +paragraph=This library is compatible with most of the TFT display based on the ST7735 chipset +url=http://arduino.cc/en/Reference/TFTLibrary +architectures=* +version=1.0 +dependencies= SPI, SD +core-dependencies=arduino (>=1.5.0) diff --git a/hardware/arduino/avr/libraries/TFT/TFT.cpp b/libraries/TFT/src/TFT.cpp similarity index 83% rename from hardware/arduino/avr/libraries/TFT/TFT.cpp rename to libraries/TFT/src/TFT.cpp index 57f71f219..8e2fed7d8 100644 --- a/hardware/arduino/avr/libraries/TFT/TFT.cpp +++ b/libraries/TFT/src/TFT.cpp @@ -1,6 +1,6 @@ #include "TFT.h" -#if (USB_VID == 0x2341) && (USB_PID == 0x803C) // are we building for Esplora? +#if ARDUINO_AVR_ESPLORA // are we building for Esplora? TFT EsploraTFT(7, 0, 1); #endif diff --git a/hardware/arduino/avr/libraries/TFT/TFT.h b/libraries/TFT/src/TFT.h similarity index 89% rename from hardware/arduino/avr/libraries/TFT/TFT.h rename to libraries/TFT/src/TFT.h index 06b6ac3c7..39cb5c14a 100644 --- a/hardware/arduino/avr/libraries/TFT/TFT.h +++ b/libraries/TFT/src/TFT.h @@ -21,7 +21,7 @@ public: /// Esplora boards have hard-wired connections with /// the Arduino LCD if mounted on the onboard connector. -#if (USB_VID == 0x2341) && (USB_PID == 0x803C) // are we building for Esplora? +#if ARDUINO_AVR_ESPLORA // are we building for Esplora? extern TFT EsploraTFT; #endif diff --git a/hardware/arduino/avr/libraries/TFT/utility/Adafruit_GFX.cpp b/libraries/TFT/src/utility/Adafruit_GFX.cpp similarity index 100% rename from hardware/arduino/avr/libraries/TFT/utility/Adafruit_GFX.cpp rename to libraries/TFT/src/utility/Adafruit_GFX.cpp diff --git a/hardware/arduino/avr/libraries/TFT/utility/Adafruit_GFX.h b/libraries/TFT/src/utility/Adafruit_GFX.h similarity index 100% rename from hardware/arduino/avr/libraries/TFT/utility/Adafruit_GFX.h rename to libraries/TFT/src/utility/Adafruit_GFX.h diff --git a/hardware/arduino/avr/libraries/TFT/utility/Adafruit_ST7735.cpp b/libraries/TFT/src/utility/Adafruit_ST7735.cpp similarity index 100% rename from hardware/arduino/avr/libraries/TFT/utility/Adafruit_ST7735.cpp rename to libraries/TFT/src/utility/Adafruit_ST7735.cpp diff --git a/hardware/arduino/avr/libraries/TFT/utility/Adafruit_ST7735.h b/libraries/TFT/src/utility/Adafruit_ST7735.h similarity index 99% rename from hardware/arduino/avr/libraries/TFT/utility/Adafruit_ST7735.h rename to libraries/TFT/src/utility/Adafruit_ST7735.h index c0d5de086..a5d560ff5 100755 --- a/hardware/arduino/avr/libraries/TFT/utility/Adafruit_ST7735.h +++ b/libraries/TFT/src/utility/Adafruit_ST7735.h @@ -25,7 +25,7 @@ #else #include "WProgram.h" #endif -#include +#include "Adafruit_GFX.h" #include // some flags for initR() :( diff --git a/hardware/arduino/avr/libraries/TFT/utility/PImage.h b/libraries/TFT/src/utility/PImage.h similarity index 100% rename from hardware/arduino/avr/libraries/TFT/utility/PImage.h rename to libraries/TFT/src/utility/PImage.h diff --git a/hardware/arduino/avr/libraries/TFT/utility/glcdfont.c b/libraries/TFT/src/utility/glcdfont.c similarity index 100% rename from hardware/arduino/avr/libraries/TFT/utility/glcdfont.c rename to libraries/TFT/src/utility/glcdfont.c diff --git a/hardware/arduino/avr/libraries/TFT/utility/keywords.txt b/libraries/TFT/src/utility/keywords.txt similarity index 100% rename from hardware/arduino/avr/libraries/TFT/utility/keywords.txt rename to libraries/TFT/src/utility/keywords.txt