1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-01-30 19:52:13 +01:00

TFT: Update PROGMEM for compatibily with newer gccutility/Adafruit_ST7735.cpp

This commit is contained in:
Cristian Maglie 2014-07-04 16:29:45 +02:00
parent b36beeb4c0
commit 1052dee790
3 changed files with 6 additions and 6 deletions

View File

@ -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
@ -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;
@ -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

View File

@ -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;

View File

@ -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,