luat_lcd_gc9306x.c 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #include "luat_base.h"
  2. #include "luat_lcd.h"
  3. #define LUAT_LOG_TAG "gc9306x"
  4. #include "luat_log.h"
  5. static const uint16_t gc9306x_init_cmds[] = {
  6. // 发送初始化命令
  7. 0x02fe,
  8. 0x02ef,
  9. 0x023a,0x0305,
  10. 0x02ad,0x0333,
  11. 0x02af,0x0355,
  12. 0x02ae,0x032b,
  13. 0x02a4,0x0344,0x0344,
  14. 0x02a5,0x0342,0x0342,
  15. 0x02aa,0x0388,0x0388,
  16. 0x02ae,0x032b,
  17. 0x02e8,0x0311,0x030b,
  18. 0x02e3,0x0301,0x0310,
  19. 0x02ff,0x0361,
  20. 0x02ac,0x0300,
  21. 0x02af,0x0367,
  22. 0x02a6,0x032a,0x032a,
  23. 0x02a7,0x032b,0x032b,
  24. 0x02a8,0x0318,0x0318,
  25. 0x02a9,0x032a,0x032a,
  26. 0x022a,0x0300,0x0300,0x0300,0x03ef,
  27. 0x022b,0x0300,0x0300,0x0301,0x033f,
  28. 0x022c,
  29. 0x02F0,0x0302,0x0300,0x0300,0x031b,0x031f,0x030b,
  30. 0x02F1,0x0301,0x0303,0x0300,0x0328,0x032b,0x030e,
  31. 0x02F2,0x030b,0x0308,0x033b,0x0304,0x0303,0x034c,
  32. 0x02F3,0x030e,0x0307,0x0346,0x0304,0x0305,0x0351,
  33. 0x02F4,0x0308,0x0315,0x0315,0x031f,0x0322,0x030F,
  34. 0x02F5,0x030b,0x0313,0x0311,0x031f,0x0321,0x030F,
  35. };
  36. luat_lcd_opts_t lcd_opts_gc9306x = {
  37. .name = "gc9306x",
  38. .init_cmds_len = sizeof(gc9306x_init_cmds)/sizeof(gc9306x_init_cmds[0]),
  39. .init_cmds = gc9306x_init_cmds,
  40. .direction0 = 0x48,
  41. .direction90 = 0xE8,
  42. .direction180 = 0x28,
  43. .direction270 = 0xF8
  44. };