Skip to content

Commit 060f0c3

Browse files
authored
Merge pull request #3127 from caternuson/qualia_update
Add init code for Qualia 4.0" 480x480 TFT
2 parents 0642870 + 1063ce6 commit 060f0c3

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

Factory_Tests/Qualia_ESP32S3_RGB666_FactoryTest/Qualia_ESP32S3_RGB666_FactoryTest.ino

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
Arduino_XCA9554SWSPI *expander = new Arduino_XCA9554SWSPI(
1010
PCA_TFT_RESET, PCA_TFT_CS, PCA_TFT_SCK, PCA_TFT_MOSI,
1111
&Wire, 0x3F);
12-
12+
1313
Arduino_ESP32RGBPanel *rgbpanel = new Arduino_ESP32RGBPanel(
1414
TFT_DE, TFT_VSYNC, TFT_HSYNC, TFT_PCLK,
1515
TFT_R1, TFT_R2, TFT_R3, TFT_R4, TFT_R5,
@@ -33,6 +33,10 @@ Arduino_RGB_Display *gfx = new Arduino_RGB_Display(
3333
// 480 /* width */, 480 /* height */, rgbpanel, 0 /* rotation */, true /* auto_flush */,
3434
// expander, GFX_NOT_DEFINED /* RST */, tl034wvs05_b1477a_init_operations, sizeof(tl034wvs05_b1477a_init_operations));
3535

36+
/* 4.0" 480x480 square */
37+
// 480 /* width */, 480 /* height */, rgbpanel, 0 /* rotation */, true /* auto_flush */,
38+
// expander, GFX_NOT_DEFINED /* RST */, tl040wvs03_init_operations, sizeof(tl040wvs03_init_operations));
39+
3640
// 3.2" 320x820 rectangle bar display
3741
// 320 /* width */, 820 /* height */, rgbpanel, 0 /* rotation */, true /* auto_flush */,
3842
// expander, GFX_NOT_DEFINED /* RST */, tl032fwv01_init_operations, sizeof(tl032fwv01_init_operations));
@@ -68,18 +72,18 @@ bool touchOK = false; // we will check if the touchscreen exists
6872
bool isFocalTouch = false;
6973

7074
void setup(void)
71-
{
75+
{
7276
Serial.begin(115200);
7377
//while (!Serial) delay(100);
74-
78+
7579
#ifdef GFX_EXTRA_PRE_INIT
7680
GFX_EXTRA_PRE_INIT();
7781
#endif
7882

7983
Serial.println("Beginning");
8084
// Init Display
8185

82-
Wire.setClock(1000000); // speed up I2C
86+
Wire.setClock(1000000); // speed up I2C
8387
if (!gfx->begin()) {
8488
Serial.println("gfx->begin() failed!");
8589
}
@@ -128,7 +132,7 @@ void loop()
128132
gfx->fillRect(p.x, p.y, 5, 5, WHITE);
129133
}
130134
}
131-
135+
132136
// use the buttons to turn off
133137
if (! expander->digitalRead(PCA_BUTTON_DOWN)) {
134138
expander->digitalWrite(PCA_TFT_BACKLIGHT, LOW);

0 commit comments

Comments
 (0)