summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMeco Man <[email protected]>2023-06-10 14:11:11 -0400
committerMan, Jianting (Meco) <[email protected]>2023-06-10 19:00:25 -0400
commit690446ee9028805087803da80cfad100925c521a (patch)
treedff4aac942ef003ac933629e07a32243ca085af0
parent28b7c88269b8b48a017b870f2b49ae27dffeacb3 (diff)
[pandor]st77xx update demo
-rw-r--r--bsp/stm32/stm32l475-atk-pandora/board/ports/arduino/ST7789_demo.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/bsp/stm32/stm32l475-atk-pandora/board/ports/arduino/ST7789_demo.cpp b/bsp/stm32/stm32l475-atk-pandora/board/ports/arduino/ST7789_demo.cpp
index 4e10f88be0..dbd67ca8b5 100644
--- a/bsp/stm32/stm32l475-atk-pandora/board/ports/arduino/ST7789_demo.cpp
+++ b/bsp/stm32/stm32l475-atk-pandora/board/ports/arduino/ST7789_demo.cpp
@@ -8,13 +8,6 @@
* 2023-05-29 Meco Man port to RTduino
*/
-/*
- * Interfacing Arduino with ST7789 TFT display (240x240 pixel).
- * Graphics test example.
- * This is a free software with NO WARRANTY.
- * https://simple-circuit.com/
- */
-
/**************************************************************************
This is a library for several Adafruit displays based on ST77* drivers.
@@ -282,12 +275,16 @@ static void st7789_setup(void)
uint16_t time = millis();
tft.fillScreen(ST77XX_BLACK);
time = millis() - time;
-
Serial.print("Fill the screen spend: ");
Serial.print(time, DEC);
Serial.println(" ms");
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);
+ time = millis();
+ time = millis() - time;
+ Serial.print("write text spend: ");
+ Serial.print(time, DEC);
+ Serial.println(" ms");
delay(1500);
// tft print function!
@@ -299,7 +296,12 @@ static void st7789_setup(void)
delay(500);
// line draw test
+ time = millis();
testlines(ST77XX_YELLOW);
+ time = millis() - time;
+ Serial.print("testlines spend: ");
+ Serial.print(time, DEC);
+ Serial.println(" ms");
delay(500);
// optimized lines