Skip to content

Commit 7628b47

Browse files
Update to support ESP8266
1 parent 6d40eb3 commit 7628b47

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

Adafruit_GFX.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,16 @@ POSSIBILITY OF SUCH DAMAGE.
3535
#include "glcdfont.c"
3636
#ifdef __AVR__
3737
#include <avr/pgmspace.h>
38+
#elif defined(ESP8266)
39+
#include <pgmspace.h>
3840
#else
3941
#define pgm_read_byte(addr) (*(const unsigned char *)(addr))
4042
#endif
4143

44+
#ifndef min
45+
#define min(a,b) ((a < b) ? a : b)
46+
#endif
47+
4248
Adafruit_GFX::Adafruit_GFX(int16_t w, int16_t h):
4349
WIDTH(w), HEIGHT(h)
4450
{

glcdfont.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
#ifdef __AVR__
55
#include <avr/io.h>
66
#include <avr/pgmspace.h>
7+
#elif defined(ESP8266)
8+
#include <pgmspace.h>
79
#else
810
#define PROGMEM
911
#endif

0 commit comments

Comments
 (0)