Skip to content

Commit

Permalink
Update to support ESP8266
Browse files Browse the repository at this point in the history
  • Loading branch information
PaintYourDragon committed Jun 27, 2015
1 parent 6d40eb3 commit 7628b47
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Adafruit_GFX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,16 @@ POSSIBILITY OF SUCH DAMAGE.
#include "glcdfont.c"
#ifdef __AVR__
#include <avr/pgmspace.h>
#elif defined(ESP8266)
#include <pgmspace.h>
#else
#define pgm_read_byte(addr) (*(const unsigned char *)(addr))
#endif

#ifndef min
#define min(a,b) ((a < b) ? a : b)
#endif

Adafruit_GFX::Adafruit_GFX(int16_t w, int16_t h):
WIDTH(w), HEIGHT(h)
{
Expand Down
2 changes: 2 additions & 0 deletions glcdfont.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#ifdef __AVR__
#include <avr/io.h>
#include <avr/pgmspace.h>
#elif defined(ESP8266)
#include <pgmspace.h>
#else
#define PROGMEM
#endif
Expand Down

0 comments on commit 7628b47

Please sign in to comment.