Skip to content

TFT: Update PROGMEM for compatibily with newer gcc #2166

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 4, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions libraries/TFT/src/utility/Adafruit_ST7735.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ void Adafruit_ST7735::writedata(uint8_t c) {
// formatting -- storage-wise this is hundreds of bytes more compact
// than the equivalent code. Companion function follows.
#define DELAY 0x80
PROGMEM static prog_uchar
PROGMEM const static unsigned char
Bcmd[] = { // Initialization commands for 7735B screens
18, // 18 commands in list:
ST7735_SWRESET, DELAY, // 1: Software reset, no args, w/delay
Expand Down Expand Up @@ -293,7 +293,7 @@ PROGMEM static prog_uchar

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

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


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

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

Expand Down
4 changes: 2 additions & 2 deletions libraries/TFT/src/utility/Adafruit_ST7735.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ class Adafruit_ST7735 : public Adafruit_GFX {
void spiwrite(uint8_t),
writecommand(uint8_t c),
writedata(uint8_t d),
commandList(uint8_t *addr),
commonInit(uint8_t *cmdList);
commandList(const uint8_t *addr),
commonInit(const uint8_t *cmdList);
//uint8_t spiread(void);

boolean hwSPI;
Expand Down
2 changes: 1 addition & 1 deletion libraries/TFT/src/utility/glcdfont.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

// standard ascii 5x7 font

static unsigned char font[] PROGMEM = {
static const unsigned char font[] PROGMEM = {
0x00, 0x00, 0x00, 0x00, 0x00,
0x3E, 0x5B, 0x4F, 0x5B, 0x3E,
0x3E, 0x6B, 0x4F, 0x6B, 0x3E,
Expand Down