PlatformIO package of the Teensy core framework compatible with GCC 10 & C++20
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

pirms 4 gadiem
123456789101112131415161718192021222324252627282930313233343536373839404142
  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_INT 19//any pin
  17. #define RA8875_CS 10//restriction for Teensy3 and CS
  18. #define RA8875_RST 8//any pin
  19. /*
  20. Teensy 3.x can use: 2,6,9,10,15,20,21,22,23
  21. */
  22. RA8875 tft = RA8875(RA8875_CS, RA8875_RST);
  23. void setup() {
  24. Serial.begin(38400);
  25. long unsigned debug_start = millis ();
  26. while (!Serial && ((millis () - debug_start) <= 5000)) ;
  27. // begin display: Choose from: RA8875_480x272, RA8875_800x480, RA8875_800x480ALT, Adafruit_480x272, Adafruit_800x480
  28. tft.begin(Adafruit_800x480);
  29. }
  30. uint8_t rot = 0;
  31. void loop(void) {
  32. test(rot);
  33. rot++;
  34. if (rot > 3) rot = 0;
  35. }