pkourany / adafruit_ili9341_ide Goto Github PK
View Code? Open in Web Editor NEWAdafruit ILI9341 library using mfGFX adapted for Particle
License: Other
Adafruit ILI9341 library using mfGFX adapted for Particle
License: Other
This is a library for the Adafruit ILI9341 display products Adapted for Particle devices and to use Adafruit_mfGFX multifont library by Paul Kourany This library works with the Adafruit 2.8" Touch Shield V2 (SPI) ----> http://www.adafruit.com/products/1651 Check out the links above for our tutorials and wiring diagrams. These displays use SPI to communicate, 4 or 5 pins are required to interface (RST is optional). Adafruit invests time and resources providing this open source code, please support Adafruit and open-source hardware by purchasing products from Adafruit! Written by Limor Fried/Ladyada for Adafruit Industries. MIT license, all text above must be included in any redistribution
Adding these include statements at the top of the library example ...
#include <Particle.h>
#include <softap_http.h>
// original example follows here
... produces these errors
In file included from lib/Adafruit_ILI9341/src/Adafruit_ILI9341.h:21:0,
from src/___graphicstest.cpp:5:
./inc/Arduino.h:22:2: error: #error isnan is not defined please ensure this header is included before any STL headers
#error isnan is not defined please ensure this header is included before any STL headers
^
In file included from lib/Adafruit_ILI9341/src/Adafruit_ILI9341.h:21:0,
from src/___graphicstest.cpp:5:
./inc/Arduino.h:173:1: error: expected ';' before 'using'
using std::isinf
^
./inc/Arduino.h:210:1: error: expected ';' before 'typedef'
typedef USARTSerial HardwareSerial;
^
However the errors go away when adding #include <Arduino.h>
like this
#include <Particle.h>
#include <Arduino.h>
#include <softap_http.h>
However, rearranging the includes like this ...
#include <Particle.h>
#include <Arduino.h>
#include "Adafruit_mfGFX.h"
#include "Adafruit_ILI9341.h"
#include <softap_http.h>
... causes a plathora of other errors
In file included from /usr/local/gcc-arm-embedded/arm-none-eabi/include/c++/5.3.1/vector:64:0,
from /usr/local/gcc-arm-embedded/arm-none-eabi/include/c++/5.3.1/bits/random.h:34,
from /usr/local/gcc-arm-embedded/arm-none-eabi/include/c++/5.3.1/random:49,
from /usr/local/gcc-arm-embedded/arm-none-eabi/include/c++/5.3.1/bits/stl_algo.h:66,
from /usr/local/gcc-arm-embedded/arm-none-eabi/include/c++/5.3.1/algorithm:62,
from ../hal/src/photon/softap_http.h:13,
from src/___graphicstest.cpp:5:
/usr/local/gcc-arm-embedded/arm-none-eabi/include/c++/5.3.1/bits/stl_vector.h:1194:23: error: macro "swap" requires 2 arguments, but only 1 given
swap(vector& __x)
^
/usr/local/gcc-arm-embedded/arm-none-eabi/include/c++/5.3.1/bits/stl_vector.h:1559:60: error: macro "swap" passed 4 arguments, but takes just 2
swap(vector<_Tp, _Alloc>& __x, vector<_Tp, _Alloc>& __y)
^
/usr/local/gcc-arm-embedded/arm-none-eabi/include/c++/5.3.1/bits/stl_vector.h:1560:19: error: macro "swap" requires 2 arguments, but only 1 given
{ __x.swap(__y); }
^
In file included from /usr/local/gcc-arm-embedded/arm-none-eabi/include/c++/5.3.1/vector:65:0,
from /usr/local/gcc-arm-embedded/arm-none-eabi/include/c++/5.3.1/bits/random.h:34,
from /usr/local/gcc-arm-embedded/arm-none-eabi/include/c++/5.3.1/random:49,
from /usr/local/gcc-arm-embedded/arm-none-eabi/include/c++/5.3.1/bits/stl_algo.h:66,
from /usr/local/gcc-arm-embedded/arm-none-eabi/include/c++/5.3.1/algorithm:62,
from ../hal/src/photon/softap_http.h:13,
from src/___graphicstest.cpp:5:
/usr/local/gcc-arm-embedded/arm-none-eabi/include/c++/5.3.1/bits/stl_bvector.h:930:21: error: macro "swap" requires 2 arguments, but only 1 given
swap(vector& __x)
^
In file included from src/___graphicstest.cpp:3:0:
lib/Adafruit_mfGFX/src/Adafruit_mfGFX.h:17:20: error: expected unqualified-id before '{' token
#define swap(a, b) { int16_t t = a; a = b; b = t; }
^
In file included from /usr/local/gcc-arm-embedded/arm-none-eabi/include/c++/5.3.1/bits/stl_algo.h:60:0,
from /usr/local/gcc-arm-embedded/arm-none-eabi/include/c++/5.3.1/algorithm:62,
from ../hal/src/photon/softap_http.h:13,
from src/___graphicstest.cpp:5:
/usr/local/gcc-arm-embedded/arm-none-eabi/include/c++/5.3.1/bits/algorithmfwd.h:573:5: error: expected unqualified-id before 'noexcept'
noexcept(__and_<is_nothrow_move_constructible<_Tp>,
^
In file included from src/___graphicstest.cpp:3:0:
lib/Adafruit_mfGFX/src/Adafruit_mfGFX.h:17:20: error: expected unqualified-id before '{' token
#define swap(a, b) { int16_t t = a; a = b; b = t; }
^
In file included from /usr/local/gcc-arm-embedded/arm-none-eabi/include/c++/5.3.1/bits/stl_algo.h:60:0,
from /usr/local/gcc-arm-embedded/arm-none-eabi/include/c++/5.3.1/algorithm:62,
from ../hal/src/photon/softap_http.h:13,
from src/___graphicstest.cpp:5:
/usr/local/gcc-arm-embedded/arm-none-eabi/include/c++/5.3.1/bits/algorithmfwd.h:582:5: error: expected unqualified-id before 'noexcept'
noexcept(noexcept(swap(*__a, *__b)))
^
/usr/local/gcc-arm-embedded/arm-none-eabi/include/c++/5.3.1/bits/algorithmfwd.h:582:39: error: expected unqualified-id before ')' token
noexcept(noexcept(swap(*__a, *__b)))
^
In file included from src/___graphicstest.cpp:3:0:
/usr/local/gcc-arm-embedded/arm-none-eabi/include/c++/5.3.1/bits/stl_vector.h: In member function 'void std::_Vector_base<_Tp, _Alloc>::_Vector_impl::_M_swap_data(std::_Vector_base<_Tp, _Alloc>::_Vector_impl&)':
lib/Adafruit_mfGFX/src/Adafruit_mfGFX.h:17:20: error: expected unqualified-id before '{' token
#define swap(a, b) { int16_t t = a; a = b; b = t; }
^
lib/Adafruit_mfGFX/src/Adafruit_mfGFX.h:17:20: error: expected unqualified-id before '{' token
#define swap(a, b) { int16_t t = a; a = b; b = t; }
^
lib/Adafruit_mfGFX/src/Adafruit_mfGFX.h:17:20: error: expected unqualified-id before '{' token
#define swap(a, b) { int16_t t = a; a = b; b = t; }
^
In file included from /usr/local/gcc-arm-embedded/arm-none-eabi/include/c++/5.3.1/vector:64:0,
from /usr/local/gcc-arm-embedded/arm-none-eabi/include/c++/5.3.1/bits/random.h:34,
from /usr/local/gcc-arm-embedded/arm-none-eabi/include/c++/5.3.1/random:49,
from /usr/local/gcc-arm-embedded/arm-none-eabi/include/c++/5.3.1/bits/stl_algo.h:66,
from /usr/local/gcc-arm-embedded/arm-none-eabi/include/c++/5.3.1/algorithm:62,
from ../hal/src/photon/softap_http.h:13,
from src/___graphicstest.cpp:5:
/usr/local/gcc-arm-embedded/arm-none-eabi/include/c++/5.3.1/bits/stl_vector.h: At global scope:
/usr/local/gcc-arm-embedded/arm-none-eabi/include/c++/5.3.1/bits/stl_vector.h:1194:7: error: variable or field 'swap' declared void
swap(vector& __x)
^
/usr/local/gcc-arm-embedded/arm-none-eabi/include/c++/5.3.1/bits/stl_vector.h:1194:7: error: expected ';' at end of member declaration
/usr/local/gcc-arm-embedded/arm-none-eabi/include/c++/5.3.1/bits/stl_vector.h:1196:7: error: expected unqualified-id before 'noexcept'
noexcept(_Alloc_traits::_S_nothrow_swap())
^
/usr/local/gcc-arm-embedded/arm-none-eabi/include/c++/5.3.1/bits/stl_vector.h:1559:5: error: variable or field 'swap' declared void
swap(vector<_Tp, _Alloc>& __x, vector<_Tp, _Alloc>& __y)
^
/usr/local/gcc-arm-embedded/arm-none-eabi/include/c++/5.3.1/bits/stl_vector.h:1560:7: error: '__x' was not declared in this scope
{ __x.swap(__y); }
^
/usr/local/gcc-arm-embedded/arm-none-eabi/include/c++/5.3.1/bits/stl_vector.h:1560:20: error: expected '}' before ';' token
{ __x.swap(__y); }
^
/usr/local/gcc-arm-embedded/arm-none-eabi/include/c++/5.3.1/bits/stl_vector.h:1563:1: error: expected declaration before '}' token
} // namespace std
^
Building with Web IDE for Photon 1.0.1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.