Renamed libraries, but using original function names.

This way one knows if he is using the old or STM library by looking at
the include line, while the sketch should compile file as the functions
are named the same. I believe this is the best compromise.
This commit is contained in:
victorpv 2015-03-18 11:27:31 -05:00
parent cbfb5d40b0
commit 78f9031154
29 changed files with 26 additions and 19 deletions

View File

@ -31,7 +31,7 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
#include "Adafruit_GFX.h"
#include "Adafruit_GFX_AS.h"
#ifdef LOAD_GLCD
#include "glcdfont.c"

View File

@ -2,7 +2,7 @@
See rights and use declaration in License.h
This library has been modified for the Maple Mini
*/
#include "Adafruit_ILI9341.h"
#include <Adafruit_ILI9341_STM.h>
#include <avr/pgmspace.h>
#include <limits.h>
#include <libmaple/dma.h>
@ -10,7 +10,10 @@ This library has been modified for the Maple Mini
#include "wiring_private.h"
#include <SPI.h> // Using library SPI in folder: D:\Documents\Arduino\hardware\STM32\STM32F1XX\libraries\SPI
//Used for DMA transfers in STM32F1XX
#if defined (__STM32F1__)
volatile bool dma1_ch3_Active = false;
#endif
// Constructor when using software SPI. All output pins are configurable.
Adafruit_ILI9341::Adafruit_ILI9341(int8_t cs, int8_t dc, int8_t mosi,

View File

@ -8,7 +8,7 @@ This library has been modified for the Maple Mini
#include "Arduino.h"
#include "Print.h"
#include "Adafruit_GFX.h"
#include <Adafruit_GFX_AS.h>
#include <avr/pgmspace.h>
#define ILI9341_TFTWIDTH 240
@ -132,7 +132,7 @@ class Adafruit_ILI9341 : public Adafruit_GFX {
private:
uint8_t tabcolor;
volatile byte lineBuffer[640];
boolean hwSPI;
@ -145,6 +145,7 @@ volatile byte lineBuffer[640];
volatile uint32 *mosiport, *clkport, *dcport, *rsport, *csport;
uint32_t _cs, _dc, _rst, _mosi, _miso, _sclk;
uint32_t mosipinmask, clkpinmask, cspinmask, dcpinmask;
volatile byte lineBuffer[640];
#elif defined (__arm__)
volatile RwReg *mosiport, *clkport, *dcport, *rsport, *csport;
uint32_t _cs, _dc, _rst, _mosi, _miso, _sclk;

View File

@ -37,8 +37,8 @@ code color
#define dc 10
#define rst 9 // you can also connect this to the Arduino reset
#include <Adafruit_GFX.h> // Core graphics library
#include <Adafruit_ILI9341.h> // Hardware-specific library
#include <Adafruit_GFX_AS.h> // Core graphics library, with extra fonts.
#include <Adafruit_ILI9341_STM.h> // STM32 DMA Hardware-specific library
#include <SPI.h>
#define ILI9341_GREY 0x5AEB
@ -55,7 +55,7 @@ unsigned int colour = 0;
void setup(void) {
tft.begin();
tft.setRotation(4);
tft.setRotation(2);
tft.fillScreen(ILI9341_BLACK);
tft.setTextSize(1);

View File

@ -17,8 +17,8 @@
#define dc 10
#define rst 9 // you can also connect this to the Arduino reset
#include <Adafruit_GFX.h> // Core graphics library
#include <Adafruit_ILI9341.h> // Hardware-specific library
#include <Adafruit_GFX_AS.h> // Core graphics library, with extra fonts.
#include <Adafruit_ILI9341_STM.h> // STM32 DMA Hardware-specific library
#include <SPI.h>
#define ILI9341_GREY 0x5AEB

View File

@ -17,9 +17,10 @@
//#define mosi 11 // Don't change
#define cs 8
#define dc 10
#define rst 9 // you can also connect this to the Arduino reset
#include <Adafruit_GFX.h> // Core graphics library
#include <Adafruit_ILI9341.h> // Hardware-specific library
#define rst 9 // you can also connect this to the Arduino reset
#include <Adafruit_GFX_AS.h> // Core graphics library, with extra fonts.
#include <Adafruit_ILI9341_STM.h> // STM32 DMA Hardware-specific library
#include <SPI.h>
Adafruit_ILI9341 tft = Adafruit_ILI9341(cs, dc, rst); // Invoke custom library

View File

@ -32,8 +32,8 @@
#define dc 10
#define rst 9 // you can also connect this to the Arduino reset
#include <Adafruit_GFX.h> // Core graphics library
#include <Adafruit_ILI9341.h> // Hardware-specific library
#include <Adafruit_GFX_AS.h> // Core graphics library, with extra fonts.
#include <Adafruit_ILI9341_STM.h> // STM32 DMA Hardware-specific library
#include <SPI.h>
Adafruit_ILI9341 tft = Adafruit_ILI9341(cs, dc, rst); // Invoke custom library

View File

@ -15,13 +15,15 @@
#include "SPI.h"
#include "Adafruit_GFX.h"
#include "Adafruit_ILI9341.h"
#include <Adafruit_GFX_AS.h> // Core graphics library, with extra fonts.
#include <Adafruit_ILI9341_STM.h> // STM32 DMA Hardware-specific library
// For the Adafruit shield, these are the default.
#define TFT_CS PB4
#define TFT_DC PA15
#define TFT_RST PB3
#define TFT_CS 8
#define TFT_DC 10
#define TFT_RST 9
// Use hardware SPI (on Uno, #13, #12, #11) and the above for CS/DC
//Adafruit_ILI9341 tft = Adafruit_ILI9341(TFT_CS, TFT_DC);