Skip to content

Commit 6aba504

Browse files
authored
Merge pull request #3210 from adafruit/colour-defines
Update color constants to RGB565 format
2 parents c80c6f7 + edf85bf commit 6aba504

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

Factory_Tests/Qualia_ESP32S3_RGB666_FactoryTest/Qualia_ESP32S3_RGB666_FactoryTest.ino

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ void setup(void)
9090

9191
Serial.println("Initialized!");
9292

93-
gfx->fillScreen(BLACK);
93+
gfx->fillScreen(RGB565_BLACK);
9494

9595
expander->pinMode(PCA_TFT_BACKLIGHT, OUTPUT);
9696
expander->digitalWrite(PCA_TFT_BACKLIGHT, HIGH);
@@ -125,11 +125,11 @@ void loop()
125125
if (isFocalTouch && focal_ctp.touched()) {
126126
TS_Point p = focal_ctp.getPoint(0);
127127
Serial.printf("(%d, %d)\n", p.x, p.y);
128-
gfx->fillRect(p.x, p.y, 5, 5, WHITE);
128+
gfx->fillRect(p.x, p.y, 5, 5, RGB565_WHITE);
129129
} else if (!isFocalTouch && cst_ctp.touched()) {
130130
CST_TS_Point p = cst_ctp.getPoint(0);
131131
Serial.printf("(%d, %d)\n", p.x, p.y);
132-
gfx->fillRect(p.x, p.y, 5, 5, WHITE);
132+
gfx->fillRect(p.x, p.y, 5, 5, RGB565_WHITE);
133133
}
134134
}
135135

Qualia/Qualia_S3_Product_Demo/Qualia_S3_Product_Demo.ino

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,28 +56,28 @@ void setup(void)
5656
while (1) yield();
5757
}
5858

59-
gfx->fillScreen(BLACK);
59+
gfx->fillScreen(RGB565_BLACK);
6060

6161
expander->pinMode(PCA_TFT_BACKLIGHT, OUTPUT);
6262
expander->digitalWrite(PCA_TFT_BACKLIGHT, HIGH);
6363

6464
Serial.println("Hello!");
65-
gfx->fillScreen(BLACK);
65+
gfx->fillScreen(RGB565_BLACK);
6666
gfx->setCursor(100, gfx->height() / 2 - 75);
6767
gfx->setTextSize(5);
68-
gfx->setTextColor(WHITE);
68+
gfx->setTextColor(RGB565_WHITE);
6969
gfx->println("Hello World!");
7070

7171
gfx->setCursor(100, gfx->height() / 2 - 25);
72-
gfx->setTextColor(RED);
72+
gfx->setTextColor(RGB565_RED);
7373
gfx->println("RED");
7474

7575
gfx->setCursor(100, gfx->height() / 2 + 25);
76-
gfx->setTextColor(GREEN);
76+
gfx->setTextColor(RGB565_GREEN);
7777
gfx->println("GREEN");
7878

7979
gfx->setCursor(100, gfx->height() / 2 + 75);
80-
gfx->setTextColor(BLUE);
80+
gfx->setTextColor(RGB565_BLUE);
8181
gfx->println("BLUE");
8282

8383
if (!ctp.begin(0, &Wire, I2C_TOUCH_ADDR)) {
@@ -86,7 +86,7 @@ void setup(void)
8686
Serial.println("No touchscreen found");
8787
touchOK = false;
8888
} else {
89-
gfx->setTextColor(WHITE);
89+
gfx->setTextColor(RGB565_WHITE);
9090
gfx->println("\nTouch found");
9191
Serial.println("Touchscreen found");
9292
touchOK = true;
@@ -101,7 +101,7 @@ void loop()
101101
if (touchOK && ctp.touched()) {
102102
TS_Point p = ctp.getPoint(0);
103103
Serial.printf("(%d, %d)\n", p.x, p.y);
104-
gfx->fillRect(p.x, p.y, 5, 5, WHITE);
104+
gfx->fillRect(p.x, p.y, 5, 5, RGB565_WHITE);
105105
}
106106

107107
// use the buttons to turn off

0 commit comments

Comments
 (0)