PlatformIO package of the Teensy core framework compatible with GCC 10 & C++20
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

benchmarks.ino 762B

3 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041
  1. /*
  2. A benchmark test - measure the speed of many drawing functions of RA8875 library at any rotation
  3. Open your serial monitor for results
  4. */
  5. #include <SPI.h>
  6. #include <RA8875.h>
  7. #define DELAY_BETWEEN 500
  8. /*
  9. Teensy3.x and Arduino's
  10. You are using 4 wire SPI here, so:
  11. MOSI: 11//Teensy3.x
  12. MISO: 12//Teensy3.x
  13. SCK: 13//Teensy3.x
  14. the rest of pin below:
  15. */
  16. #define RA8875_CS 10
  17. #define RA8875_RESET 9
  18. /*
  19. DUE can use 4,10 or 52( or 53? don't remember)
  20. */
  21. RA8875 tft = RA8875(RA8875_CS, RA8875_RESET);
  22. void setup() {
  23. Serial.begin(38400);
  24. long unsigned debug_start = millis ();
  25. while (!Serial && ((millis () - debug_start) <= 5000)) ;
  26. tft.begin(RA8875_800x480);
  27. }
  28. uint8_t rot = 0;
  29. void loop(void) {
  30. test(rot);
  31. rot++;
  32. if (rot > 3) rot = 0;
  33. }