Skip to content

Commit df013e2

Browse files
authored
Update color constants to RGB565 format
1 parent c80c6f7 commit df013e2

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

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)