mirror of
https://github.com/arduino/Arduino.git
synced 2025-02-07 01:54:26 +01:00
TFT: Update PROGMEM for compatibily with newer gccutility/Adafruit_ST7735.cpp
This commit is contained in:
parent
b36beeb4c0
commit
1052dee790
@ -100,7 +100,7 @@ void Adafruit_ST7735::writedata(uint8_t c) {
|
|||||||
// formatting -- storage-wise this is hundreds of bytes more compact
|
// formatting -- storage-wise this is hundreds of bytes more compact
|
||||||
// than the equivalent code. Companion function follows.
|
// than the equivalent code. Companion function follows.
|
||||||
#define DELAY 0x80
|
#define DELAY 0x80
|
||||||
PROGMEM static prog_uchar
|
PROGMEM const static unsigned char
|
||||||
Bcmd[] = { // Initialization commands for 7735B screens
|
Bcmd[] = { // Initialization commands for 7735B screens
|
||||||
18, // 18 commands in list:
|
18, // 18 commands in list:
|
||||||
ST7735_SWRESET, DELAY, // 1: Software reset, no args, w/delay
|
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
|
// Companion code to the above tables. Reads and issues
|
||||||
// a series of LCD commands stored in PROGMEM byte array.
|
// 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;
|
uint8_t numCommands, numArgs;
|
||||||
uint16_t ms;
|
uint16_t ms;
|
||||||
@ -318,7 +318,7 @@ void Adafruit_ST7735::commandList(uint8_t *addr) {
|
|||||||
|
|
||||||
|
|
||||||
// Initialization code common to both 'B' and 'R' type displays
|
// 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
|
colstart = rowstart = 0; // May be overridden in init func
|
||||||
|
|
||||||
|
@ -130,8 +130,8 @@ class Adafruit_ST7735 : public Adafruit_GFX {
|
|||||||
void spiwrite(uint8_t),
|
void spiwrite(uint8_t),
|
||||||
writecommand(uint8_t c),
|
writecommand(uint8_t c),
|
||||||
writedata(uint8_t d),
|
writedata(uint8_t d),
|
||||||
commandList(uint8_t *addr),
|
commandList(const uint8_t *addr),
|
||||||
commonInit(uint8_t *cmdList);
|
commonInit(const uint8_t *cmdList);
|
||||||
//uint8_t spiread(void);
|
//uint8_t spiread(void);
|
||||||
|
|
||||||
boolean hwSPI;
|
boolean hwSPI;
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
// standard ascii 5x7 font
|
// standard ascii 5x7 font
|
||||||
|
|
||||||
static unsigned char font[] PROGMEM = {
|
static const unsigned char font[] PROGMEM = {
|
||||||
0x00, 0x00, 0x00, 0x00, 0x00,
|
0x00, 0x00, 0x00, 0x00, 0x00,
|
||||||
0x3E, 0x5B, 0x4F, 0x5B, 0x3E,
|
0x3E, 0x5B, 0x4F, 0x5B, 0x3E,
|
||||||
0x3E, 0x6B, 0x4F, 0x6B, 0x3E,
|
0x3E, 0x6B, 0x4F, 0x6B, 0x3E,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user