Skip to content

Commit be22475

Browse files
committed
Moved pgmem include into #if define
Library should work for ESP32 boards now
1 parent 26e2715 commit be22475

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/SparkFun_Alphanumeric_Display.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,19 @@ local, and you've found our code helpful, please buy us a round!
2929
Distributed as-is; no warranty is given.
3030
******************************************************************************/
3131

32-
#include <avr/pgmspace.h>
3332
#include <SparkFun_Alphanumeric_Display.h>
3433

3534
/*--------------------------- Character Map ----------------------------------*/
3635
#define SFE_ALPHANUM_UNKNOWN_CHAR 95
3736

3837
//This is the lookup table of segments for various characters
38+
//For AVR architecture, use PROGMEM
39+
#if defined(ARDUINO_ARCH_AVR)
40+
#include <avr/pgmspace.h>
3941
static const uint16_t PROGMEM alphanumeric_segs[96]{
42+
#else
43+
static const uint16_t alphanumeric_segs[96]{
44+
#endif
4045
//nmlkjihgfedcba
4146
0b00000000000000, //' ' (space)
4247
0b00001000001000, //'!' - added to map

0 commit comments

Comments
 (0)