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.

52 lines
1.1 KiB

9 months ago
  1. // Change the width and height if required (defined in portrait mode)
  2. // or use the constructor to over-ride defaults
  3. #define TFT_WIDTH 320
  4. #define TFT_HEIGHT 480
  5. // Delay between some initialisation commands
  6. #define TFT_INIT_DELAY 0x80 // Not used unless commandlist invoked
  7. // Generic commands used by TFT_eSPar.cpp
  8. #define TFT_NOP 0x00
  9. #define TFT_SWRST 0x01
  10. #define TFT_SLPIN 0x10
  11. #define TFT_SLPOUT 0x11
  12. #define TFT_INVOFF 0x20
  13. #define TFT_INVON 0x21
  14. #define TFT_DISPOFF 0x28
  15. #define TFT_DISPON 0x29
  16. #define TFT_CASET 0x2A
  17. #define TFT_PASET 0x2B
  18. #define TFT_RAMWR 0x2C
  19. #define TFT_RAMRD 0x2E
  20. #define TFT_MADCTL 0x36
  21. #define TFT_MAD_MY 0x80
  22. #define TFT_MAD_MX 0x40
  23. #define TFT_MAD_MV 0x20
  24. #define TFT_MAD_ML 0x10
  25. #define TFT_MAD_RGB 0x00
  26. #define TFT_MAD_BGR 0x08
  27. #define TFT_MAD_MH 0x04
  28. #define TFT_MAD_SS 0x02
  29. #define TFT_MAD_GS 0x01
  30. #ifdef TFT_RGB_ORDER
  31. #if (TFT_RGB_ORDER == 1)
  32. #define TFT_MAD_COLOR_ORDER TFT_MAD_RGB
  33. #else
  34. #define TFT_MAD_COLOR_ORDER TFT_MAD_BGR
  35. #endif
  36. #else
  37. #define TFT_MAD_COLOR_ORDER TFT_MAD_BGR
  38. #endif
  39. #define TFT_IDXRD 0x00 // ILI9341 only, indexed control register read