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.

40 lines
716B

  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. #define RA8875_RESET 9//any pin or nothing!
  9. #if defined(NEEDS_SET_MODULE)//Energia, this case is for stellaris/tiva
  10. RA8875 tft = RA8875(3);//select SPI module 3
  11. /*
  12. for module 3 (stellaris)
  13. SCLK: PD_0
  14. MOSI: PD_3
  15. MISO: PD_2
  16. SS: PD_1
  17. */
  18. #endif
  19. void setup() {
  20. Serial.begin(38400);
  21. long unsigned debug_start = millis ();
  22. while (!Serial && ((millis () - debug_start) <= 5000)) ;
  23. tft.begin(RA8875_800x480);
  24. }
  25. uint8_t rot = 0;
  26. void loop(void) {
  27. test(rot);
  28. rot++;
  29. if (rot > 3) rot = 0;
  30. }