panel_750_gdey075t7.h 4.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. #pragma once
  2. // GDEY075T7 - 7.5" 800x480 mono, UC8179 (GD7965). Captured clean from the
  3. // stock GxEPD2_750_GDEY075T7 driver (single region, 1bpp, no hand-assembly).
  4. // Same controller family as GDEQ0583T31 (panel_583_gdeq0583t31.h), and it
  5. // shows: identical 0x90 window bracketed by 0x91 "partial in" / 0x92
  6. // "partial out", 0x13 plane write, and a full _InitDisplay() re-run before
  7. // the 0x12 refresh trigger on every cycle (the UC8179 "double-init" quirk) -
  8. // so 0x91+0x90 sit in window_sequence and 0x92 + the re-init + 0x12 make up
  9. // refresh_sequence, exactly as on the 583.
  10. #include "epd_command.h"
  11. namespace esphome::gxepd2 {
  12. inline const uint8_t PANEL_750_GDEY075T7_INIT_0_00[] = {0x1F};
  13. inline const uint8_t PANEL_750_GDEY075T7_INIT_1_01[] = {0x07, 0x07, 0x3F, 0x3F, 0x09};
  14. inline const uint8_t PANEL_750_GDEY075T7_INIT_2_06[] = {0x17, 0x17, 0x28, 0x17};
  15. inline const uint8_t PANEL_750_GDEY075T7_INIT_3_61[] = {0x03, 0x20, 0x01, 0xE0}; // TRES 800x480
  16. inline const uint8_t PANEL_750_GDEY075T7_INIT_4_15[] = {0x00};
  17. inline const uint8_t PANEL_750_GDEY075T7_INIT_5_50[] = {0x29, 0x07};
  18. inline const uint8_t PANEL_750_GDEY075T7_INIT_6_60[] = {0x22};
  19. inline const uint8_t PANEL_750_GDEY075T7_INIT_7_E3[] = {0x22};
  20. inline const uint8_t PANEL_750_GDEY075T7_INIT_8_E0[] = {0x02};
  21. inline const uint8_t PANEL_750_GDEY075T7_INIT_9_E5[] = {0x6E};
  22. inline const EpdCommand PANEL_750_GDEY075T7_INIT[] = {
  23. {0x00, PANEL_750_GDEY075T7_INIT_0_00, 1},
  24. {0x01, PANEL_750_GDEY075T7_INIT_1_01, 5},
  25. {0x06, PANEL_750_GDEY075T7_INIT_2_06, 4},
  26. {0x61, PANEL_750_GDEY075T7_INIT_3_61, 4},
  27. {0x15, PANEL_750_GDEY075T7_INIT_4_15, 1},
  28. {0x50, PANEL_750_GDEY075T7_INIT_5_50, 2},
  29. {0x60, PANEL_750_GDEY075T7_INIT_6_60, 1},
  30. {0xE3, PANEL_750_GDEY075T7_INIT_7_E3, 1},
  31. {0xE0, PANEL_750_GDEY075T7_INIT_8_E0, 1},
  32. {0xE5, PANEL_750_GDEY075T7_INIT_9_E5, 1},
  33. {0x04, nullptr, 0, /*delay_before_ms=*/0, /*delay_after_ms=*/0, /*wait_busy_after=*/true}, // power on
  34. };
  35. // 0x91 "partial in" then 0x90 window (x 0..799, y 0..479, full frame).
  36. inline const uint8_t PANEL_750_GDEY075T7_WINDOW_REGION[] = {0x00, 0x00, 0x03, 0x1F, 0x00, 0x00, 0x01, 0xDF, 0x01};
  37. inline const EpdCommand PANEL_750_GDEY075T7_WINDOW[] = {
  38. {0x91, nullptr, 0},
  39. {0x90, PANEL_750_GDEY075T7_WINDOW_REGION, 9},
  40. };
  41. // 0x92 "partial out" closes the window the plane burst wrote, then the
  42. // driver re-runs its whole init (UC8179 double-init) with TSSET=0x5A before
  43. // the 0x12 refresh trigger.
  44. inline const uint8_t PANEL_750_GDEY075T7_REFRESH_1_00[] = {0x1F};
  45. inline const uint8_t PANEL_750_GDEY075T7_REFRESH_2_01[] = {0x07, 0x07, 0x3F, 0x3F, 0x09};
  46. inline const uint8_t PANEL_750_GDEY075T7_REFRESH_3_06[] = {0x17, 0x17, 0x28, 0x17};
  47. inline const uint8_t PANEL_750_GDEY075T7_REFRESH_4_61[] = {0x03, 0x20, 0x01, 0xE0};
  48. inline const uint8_t PANEL_750_GDEY075T7_REFRESH_5_15[] = {0x00};
  49. inline const uint8_t PANEL_750_GDEY075T7_REFRESH_6_50[] = {0x29, 0x07};
  50. inline const uint8_t PANEL_750_GDEY075T7_REFRESH_7_60[] = {0x22};
  51. inline const uint8_t PANEL_750_GDEY075T7_REFRESH_8_E3[] = {0x22};
  52. inline const uint8_t PANEL_750_GDEY075T7_REFRESH_9_00[] = {0x1F};
  53. inline const uint8_t PANEL_750_GDEY075T7_REFRESH_10_E0[] = {0x02};
  54. inline const uint8_t PANEL_750_GDEY075T7_REFRESH_11_E5[] = {0x5A}; // TSSET before refresh
  55. inline const EpdCommand PANEL_750_GDEY075T7_REFRESH[] = {
  56. {0x92, nullptr, 0, /*delay_before_ms=*/0, /*delay_after_ms=*/1, /*wait_busy_after=*/false},
  57. {0x00, PANEL_750_GDEY075T7_REFRESH_1_00, 1},
  58. {0x01, PANEL_750_GDEY075T7_REFRESH_2_01, 5},
  59. {0x06, PANEL_750_GDEY075T7_REFRESH_3_06, 4},
  60. {0x61, PANEL_750_GDEY075T7_REFRESH_4_61, 4},
  61. {0x15, PANEL_750_GDEY075T7_REFRESH_5_15, 1},
  62. {0x50, PANEL_750_GDEY075T7_REFRESH_6_50, 2},
  63. {0x60, PANEL_750_GDEY075T7_REFRESH_7_60, 1},
  64. {0xE3, PANEL_750_GDEY075T7_REFRESH_8_E3, 1},
  65. {0x00, PANEL_750_GDEY075T7_REFRESH_9_00, 1},
  66. {0xE0, PANEL_750_GDEY075T7_REFRESH_10_E0, 1},
  67. {0xE5, PANEL_750_GDEY075T7_REFRESH_11_E5, 1},
  68. {0x12, nullptr, 0, /*delay_before_ms=*/0, /*delay_after_ms=*/0, /*wait_busy_after=*/true}, // display refresh
  69. };
  70. inline const EpdPanelDescriptor PANEL_750_GDEY075T7 = {
  71. .width = 800,
  72. .height = 480,
  73. .busy_active_level = false, // GxEPD2_EPD(..., /*busy_level=*/LOW, ...)
  74. .busy_timeout_ms = 20000, // full_refresh_time is 1200ms; generous ceiling, same style as the 583
  75. .init_sequence = PANEL_750_GDEY075T7_INIT,
  76. .init_sequence_len = sizeof(PANEL_750_GDEY075T7_INIT) / sizeof(PANEL_750_GDEY075T7_INIT[0]),
  77. .window_sequence = {PANEL_750_GDEY075T7_WINDOW, nullptr},
  78. .window_sequence_len = {sizeof(PANEL_750_GDEY075T7_WINDOW) / sizeof(PANEL_750_GDEY075T7_WINDOW[0]), 0},
  79. .plane_count = 1,
  80. .plane_write_cmd = {0x13, 0x00},
  81. .plane_invert = {false, false},
  82. .bits_per_pixel = 1,
  83. .refresh_sequence = PANEL_750_GDEY075T7_REFRESH,
  84. .refresh_sequence_len = sizeof(PANEL_750_GDEY075T7_REFRESH) / sizeof(PANEL_750_GDEY075T7_REFRESH[0]),
  85. };
  86. } // namespace esphome::gxepd2