panel_750.h 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. // GENERATED by emit_descriptor from GxEPD2_750 - candidate.
  2. // Command sequences, plane layout and plane_invert are observed here;
  3. // for a packed panel bits_per_pixel/palette/blank_code are probe-filled
  4. // when the colour family is recognised (4-colour/7-colour), else left TODO. A
  5. // dual-region panel also gets plane_width and a candidate line_order; the
  6. // exact PAIRED_EDGES row order still wants diag/driver confirmation.
  7. #pragma once
  8. #include "epd_command.h"
  9. namespace esphome::gxepd2 {
  10. // 2-code packed mono (see .bits_per_pixel below): derived purely by observing
  11. // raw white/black fills through the plane-write path, no colour wrapper to
  12. // drive (see make_resolver_bw_packed in emit_descriptor.h).
  13. inline const EpdPaletteEntry PANEL_750_PALETTE[] = {
  14. {0x00, 0x00, 0x00, 0x00}, // black
  15. {0xFF, 0xFF, 0xFF, 0x03}, // white
  16. };
  17. inline const uint8_t PANEL_750_PALETTE_LEN = sizeof(PANEL_750_PALETTE) / sizeof(PANEL_750_PALETTE[0]);
  18. inline const uint8_t PANEL_750_INIT_0_65[] = {0x01};
  19. inline const uint8_t PANEL_750_INIT_2_65[] = {0x00};
  20. inline const uint8_t PANEL_750_INIT_3_01[] = {0x37, 0x00};
  21. inline const uint8_t PANEL_750_INIT_4_00[] = {0xCF, 0x08};
  22. inline const uint8_t PANEL_750_INIT_5_06[] = {0xC7, 0xCC, 0x28};
  23. inline const uint8_t PANEL_750_INIT_6_30[] = {0x3C};
  24. inline const uint8_t PANEL_750_INIT_7_41[] = {0x00};
  25. inline const uint8_t PANEL_750_INIT_8_50[] = {0x77};
  26. inline const uint8_t PANEL_750_INIT_9_60[] = {0x22};
  27. inline const uint8_t PANEL_750_INIT_10_61[] = {0x02, 0x80, 0x01, 0x80};
  28. inline const uint8_t PANEL_750_INIT_11_82[] = {0x1E};
  29. inline const uint8_t PANEL_750_INIT_12_E5[] = {0x03};
  30. inline const EpdCommand PANEL_750_INIT[] = {
  31. {0x65, PANEL_750_INIT_0_65, 1},
  32. {0xAB, nullptr, 0},
  33. {0x65, PANEL_750_INIT_2_65, 1},
  34. {0x01, PANEL_750_INIT_3_01, 2},
  35. {0x00, PANEL_750_INIT_4_00, 2},
  36. {0x06, PANEL_750_INIT_5_06, 3},
  37. {0x30, PANEL_750_INIT_6_30, 1},
  38. {0x41, PANEL_750_INIT_7_41, 1},
  39. {0x50, PANEL_750_INIT_8_50, 1},
  40. {0x60, PANEL_750_INIT_9_60, 1},
  41. {0x61, PANEL_750_INIT_10_61, 4},
  42. {0x82, PANEL_750_INIT_11_82, 1},
  43. {0xE5, PANEL_750_INIT_12_E5, 1},
  44. {0x04, nullptr, 0, /*delay_before_ms=*/0, /*delay_after_ms=*/0, /*wait_busy_after=*/true},
  45. };
  46. inline const uint8_t PANEL_750_WINDOW_SEQ0_1_90[] = {0x00, 0x00, 0x02, 0x7F, 0x00, 0x00, 0x01, 0x7F, 0x01};
  47. inline const EpdCommand PANEL_750_WINDOW_SEQ0[] = {
  48. {0x91, nullptr, 0},
  49. {0x90, PANEL_750_WINDOW_SEQ0_1_90, 9},
  50. };
  51. inline const uint8_t PANEL_750_REFRESH_1_65[] = {0x01};
  52. inline const uint8_t PANEL_750_REFRESH_3_65[] = {0x00};
  53. inline const uint8_t PANEL_750_REFRESH_4_01[] = {0x37, 0x00};
  54. inline const uint8_t PANEL_750_REFRESH_5_00[] = {0xCF, 0x08};
  55. inline const uint8_t PANEL_750_REFRESH_6_06[] = {0xC7, 0xCC, 0x28};
  56. inline const uint8_t PANEL_750_REFRESH_7_30[] = {0x3C};
  57. inline const uint8_t PANEL_750_REFRESH_8_41[] = {0x00};
  58. inline const uint8_t PANEL_750_REFRESH_9_50[] = {0x77};
  59. inline const uint8_t PANEL_750_REFRESH_10_60[] = {0x22};
  60. inline const uint8_t PANEL_750_REFRESH_11_61[] = {0x02, 0x80, 0x01, 0x80};
  61. inline const uint8_t PANEL_750_REFRESH_12_82[] = {0x1E};
  62. inline const uint8_t PANEL_750_REFRESH_13_E5[] = {0x03};
  63. inline const EpdCommand PANEL_750_REFRESH[] = {
  64. {0x92, nullptr, 0, /*delay_before_ms=*/0, /*delay_after_ms=*/1, /*wait_busy_after=*/false},
  65. {0x65, PANEL_750_REFRESH_1_65, 1},
  66. {0xAB, nullptr, 0},
  67. {0x65, PANEL_750_REFRESH_3_65, 1},
  68. {0x01, PANEL_750_REFRESH_4_01, 2},
  69. {0x00, PANEL_750_REFRESH_5_00, 2},
  70. {0x06, PANEL_750_REFRESH_6_06, 3},
  71. {0x30, PANEL_750_REFRESH_7_30, 1},
  72. {0x41, PANEL_750_REFRESH_8_41, 1},
  73. {0x50, PANEL_750_REFRESH_9_50, 1},
  74. {0x60, PANEL_750_REFRESH_10_60, 1},
  75. {0x61, PANEL_750_REFRESH_11_61, 4},
  76. {0x82, PANEL_750_REFRESH_12_82, 1},
  77. {0xE5, PANEL_750_REFRESH_13_E5, 1},
  78. {0x12, nullptr, 0, /*delay_before_ms=*/0, /*delay_after_ms=*/0, /*wait_busy_after=*/true},
  79. };
  80. inline const EpdCommand PANEL_750_POWER_OFF[] = {
  81. {0x02, nullptr, 0, /*delay_before_ms=*/0, /*delay_after_ms=*/0, /*wait_busy_after=*/true},
  82. };
  83. inline const uint8_t PANEL_750_HIBERNATE_0_07[] = {0xA5};
  84. inline const EpdCommand PANEL_750_HIBERNATE[] = {
  85. {0x07, PANEL_750_HIBERNATE_0_07, 1},
  86. };
  87. inline const EpdPanelDescriptor PANEL_750 = {
  88. .width = 640,
  89. .height = 384,
  90. .busy_active_level = false,
  91. .busy_timeout_ms = 60000, // generous diagnostic ceiling (vendor full_refresh_time 4500ms, 4bpp 7-colour class); dev-tunable
  92. .init_sequence = PANEL_750_INIT,
  93. .init_sequence_len = sizeof(PANEL_750_INIT) / sizeof(PANEL_750_INIT[0]),
  94. .window_sequence = {PANEL_750_WINDOW_SEQ0, nullptr},
  95. .window_sequence_len = {sizeof(PANEL_750_WINDOW_SEQ0) / sizeof(PANEL_750_WINDOW_SEQ0[0]), 0},
  96. .plane_count = 1,
  97. .plane_write_cmd = {0x10, 0x00},
  98. .plane_invert = {false, false}, // unused: packed panel
  99. .bits_per_pixel = 4, // probe: derived from raw 1bpp fills, no colour wrapper: black=0x00 white=0x03, 2 px/wire-byte
  100. .palette = PANEL_750_PALETTE,
  101. .palette_len = PANEL_750_PALETTE_LEN,
  102. .blank_code = 0x03, // observed white-fill code
  103. .refresh_sequence = PANEL_750_REFRESH,
  104. .refresh_sequence_len = sizeof(PANEL_750_REFRESH) / sizeof(PANEL_750_REFRESH[0]),
  105. .power_off_sequence = PANEL_750_POWER_OFF, // probe: powerOff(), fresh session after a normal refresh
  106. .power_off_sequence_len = sizeof(PANEL_750_POWER_OFF) / sizeof(PANEL_750_POWER_OFF[0]),
  107. .hibernate_sequence = PANEL_750_HIBERNATE, // probe: hibernate()'s tail past powerOff() (see file header)
  108. .hibernate_sequence_len = sizeof(PANEL_750_HIBERNATE) / sizeof(PANEL_750_HIBERNATE[0]),
  109. };
  110. } // namespace esphome::gxepd2