Skip to content

Commit 1052dee

Browse files
committed
TFT: Update PROGMEM for compatibily with newer gccutility/Adafruit_ST7735.cpp
1 parent b36beeb commit 1052dee

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

libraries/TFT/src/utility/Adafruit_ST7735.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ void Adafruit_ST7735::writedata(uint8_t c) {
100100
// formatting -- storage-wise this is hundreds of bytes more compact
101101
// than the equivalent code. Companion function follows.
102102
#define DELAY 0x80
103-
PROGMEM static prog_uchar
103+
PROGMEM const static unsigned char
104104
Bcmd[] = { // Initialization commands for 7735B screens
105105
18, // 18 commands in list:
106106
ST7735_SWRESET, DELAY, // 1: Software reset, no args, w/delay
@@ -293,7 +293,7 @@ PROGMEM static prog_uchar
293293

294294
// Companion code to the above tables. Reads and issues
295295
// a series of LCD commands stored in PROGMEM byte array.
296-
void Adafruit_ST7735::commandList(uint8_t *addr) {
296+
void Adafruit_ST7735::commandList(const uint8_t *addr) {
297297

298298
uint8_t numCommands, numArgs;
299299
uint16_t ms;
@@ -318,7 +318,7 @@ void Adafruit_ST7735::commandList(uint8_t *addr) {
318318

319319

320320
// Initialization code common to both 'B' and 'R' type displays
321-
void Adafruit_ST7735::commonInit(uint8_t *cmdList) {
321+
void Adafruit_ST7735::commonInit(const uint8_t *cmdList) {
322322

323323
colstart = rowstart = 0; // May be overridden in init func
324324

libraries/TFT/src/utility/Adafruit_ST7735.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ class Adafruit_ST7735 : public Adafruit_GFX {
130130
void spiwrite(uint8_t),
131131
writecommand(uint8_t c),
132132
writedata(uint8_t d),
133-
commandList(uint8_t *addr),
134-
commonInit(uint8_t *cmdList);
133+
commandList(const uint8_t *addr),
134+
commonInit(const uint8_t *cmdList);
135135
//uint8_t spiread(void);
136136

137137
boolean hwSPI;

libraries/TFT/src/utility/glcdfont.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
// standard ascii 5x7 font
1010

11-
static unsigned char font[] PROGMEM = {
11+
static const unsigned char font[] PROGMEM = {
1212
0x00, 0x00, 0x00, 0x00, 0x00,
1313
0x3E, 0x5B, 0x4F, 0x5B, 0x3E,
1414
0x3E, 0x6B, 0x4F, 0x6B, 0x3E,

0 commit comments

Comments
 (0)