luat_lcd_gc9a01.c 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. #include "luat_base.h"
  2. #include "luat_lcd.h"
  3. #define LUAT_LOG_TAG "gc9a01"
  4. #include "luat_log.h"
  5. static const uint16_t gc9a01_init_cmds[] = {
  6. 0x02EF,
  7. 0x02EB,0x0314,
  8. 0x02FE,
  9. 0x02EF,
  10. 0x02EB,0x0314,
  11. 0x0284,0x0340,
  12. 0x0285,0x03FF,
  13. 0x0286,0x03FF,
  14. 0x0287,0x03FF,
  15. 0x0288,0x030A,
  16. 0x0289,0x0321,
  17. 0x028A,0x0300,
  18. 0x028B,0x0380,
  19. 0x028C,0x0301,
  20. 0x028D,0x0301,
  21. 0x028E,0x03FF,
  22. 0x028F,0x03FF,
  23. 0x02B6,0x0300,0x0320,
  24. 0x023A,0x0305,
  25. 0x0290,0x0308,0x0308,0x0308,0x0308,
  26. 0x02BD,0x0306,
  27. 0x02BC,0x0300,
  28. 0x02FF,0x0360,0x0301,0x0304,
  29. 0x02C3,0x0313,
  30. 0x02C4,0x0313,
  31. 0x02C9,0x0322,
  32. 0x02BE,0x0311,
  33. 0x02E1,0x0310,0x030E,
  34. 0x02DF,0x0321,0x030c,0x0302,
  35. 0x02F0,0x0345,0x0309,0x0308,0x0308,0x0326,0x032A,
  36. 0x02F1,0x0343,0x0370,0x0372,0x0336,0x0337,0x036F,
  37. 0x02F2,0x0345,0x0309,0x0308,0x0308,0x0326,0x032A,
  38. 0x02F3,0x0343,0x0370,0x0372,0x0336,0x0337,0x036F,
  39. 0x02ED,0x031B,0x030B,
  40. 0x02AE,0x0377,
  41. 0x02CD,0x0363,
  42. 0x0270,0x0307,0x0307,0x0304,0x030E,0x030F,0x0309,0x0307,0x0308,0x0303,
  43. 0x02E8,0x0334,
  44. 0x0262,0x0318,0x030D,0x0371,0x03ED,0x0370,0x0370,0x0318,0x030F,0x0371,0x03EF,0x0370,0x0370,
  45. 0x0263,0x0318,0x0311,0x0371,0x03F1,0x0370,0x0370,0x0318,0x0313,0x0371,0x03F3,0x0370,0x0370,
  46. 0x0264,0x0328,0x0329,0x03F1,0x0301,0x03F1,0x0300,0x0307,
  47. 0x0266,0x033C,0x0300,0x03CD,0x0367,0x0345,0x0345,0x0310,0x0300,0x0300,0x0300,
  48. 0x0267,0x0300,0x033C,0x0300,0x0300,0x0300,0x0301,0x0354,0x0310,0x0332,0x0398,
  49. 0x0274,0x0310,0x0385,0x0380,0x0300,0x0300,0x034E,0x0300,
  50. 0x0298,0x033e,0x0307,
  51. 0x0235,
  52. 0x0221,
  53. };
  54. luat_lcd_opts_t lcd_opts_gc9a01 = {
  55. .name = "gc9a01",
  56. .init_cmds_len = sizeof(gc9a01_init_cmds)/sizeof(gc9a01_init_cmds[0]),
  57. .init_cmds = gc9a01_init_cmds,
  58. .direction0 = 0x08,
  59. .direction90 = 0xC8,
  60. .direction180 = 0x68,
  61. .direction270 = 0xA8
  62. };