Skip to content

Commit 690446e

Browse files
committed
[pandor]st77xx update demo
1 parent 28b7c88 commit 690446e

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

bsp/stm32/stm32l475-atk-pandora/board/ports/arduino/ST7789_demo.cpp

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,6 @@
88
* 2023-05-29 Meco Man port to RTduino
99
*/
1010

11-
/*
12-
* Interfacing Arduino with ST7789 TFT display (240x240 pixel).
13-
* Graphics test example.
14-
* This is a free software with NO WARRANTY.
15-
* https://simple-circuit.com/
16-
*/
17-
1811
/**************************************************************************
1912
This is a library for several Adafruit displays based on ST77* drivers.
2013
@@ -282,12 +275,16 @@ static void st7789_setup(void)
282275
uint16_t time = millis();
283276
tft.fillScreen(ST77XX_BLACK);
284277
time = millis() - time;
285-
286278
Serial.print("Fill the screen spend: ");
287279
Serial.print(time, DEC);
288280
Serial.println(" ms");
289281

290282
testdrawtext((char *)"RTduino is an open source project which is compatible with Arduino APIs so that RT-Thread beginners can easily get start to use RT-Thread through Arduino APIs, which significantly reduces the difficulty of learning RT-Thread.", ST77XX_WHITE);
283+
time = millis();
284+
time = millis() - time;
285+
Serial.print("write text spend: ");
286+
Serial.print(time, DEC);
287+
Serial.println(" ms");
291288
delay(1500);
292289

293290
// tft print function!
@@ -299,7 +296,12 @@ static void st7789_setup(void)
299296
delay(500);
300297

301298
// line draw test
299+
time = millis();
302300
testlines(ST77XX_YELLOW);
301+
time = millis() - time;
302+
Serial.print("testlines spend: ");
303+
Serial.print(time, DEC);
304+
Serial.println(" ms");
303305
delay(500);
304306

305307
// optimized lines

0 commit comments

Comments
 (0)