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.

49 lines
1.1KB

  1. /*
  2. Simple test of BTE block move
  3. */
  4. #include <SPI.h>
  5. #include <RA8875.h>
  6. #define RA8875_RESET 9//any pin or nothing!
  7. #if defined(NEEDS_SET_MODULE)//Energia, this case is for stellaris/tiva
  8. RA8875 tft = RA8875(3);//select SPI module 3
  9. /*
  10. for module 3 (stellaris)
  11. SCLK: PD_0
  12. MOSI: PD_3
  13. MISO: PD_2
  14. SS: PD_1
  15. */
  16. #endif
  17. void setup()
  18. {
  19. Serial.begin(38400);
  20. //long unsigned debug_start = millis ();
  21. // while (!Serial && ((millis () - debug_start) <= 400)) ;
  22. Serial.println("RA8875 start");
  23. tft.begin(RA8875_800x480);
  24. //tft.setRotation(0);
  25. //fill a gradient, so we can test BTEing stuff around the screen
  26. for(int i=0;i<tft.height();i++) tft.drawLine(0,i,tft.width()-1,i,tft.Color565(map(i,0,tft.height(),128,40), map(i,0,tft.height(),255,40), map(i,0,tft.height(),40,128)));
  27. tft.setTextColor(RA8875_PINK,RA8875_BLUE);
  28. tft.setCursor(30,30);
  29. tft.print("HELLO WORLD!");
  30. //The transparent-move option uses the foreground colour as the transparent colour.
  31. tft.setTextColor(RA8875_BLUE);
  32. tft.BTE_move(20,20,30,30,200,200,0,0,true);
  33. }
  34. void loop()
  35. {
  36. }