Răsfoiți Sursa

Add GxEPD2_371 (371) mono panel descriptor

Autonomous capture-pipeline run; structural, not bench-verified.
ZiB 2 săptămâni în urmă
părinte
comite
dfb3b922b1

+ 1 - 0
components/gxepd2/display.py

@@ -114,6 +114,7 @@ PANELS = {
     "GxEPD2_290_T94_V2": Panel("PANEL_290_T94_V2", "GDEM029T94", "TODO", "mono", "structural"),
     "GxEPD2_310_GDEQ031T10": Panel("PANEL_310_GDEQ031T10", "GDEQ031T10", "UC8253", "mono", "structural"),
     "GxEPD2_370_TC1": Panel("PANEL_370_TC1", "TODO", "TODO", "mono", "structural"),
+    "GxEPD2_371": Panel("PANEL_371", "GDEW0371W7", "IL0324", "mono", "structural"),
     # Diagnostic variant: the 396x272 master region as a self-contained panel.
     "GxEPD2_579c_GDEY0579F51_MASTER_ONLY": Panel(
         "PANEL_579C_GDEY0579F51_MASTER_ONLY", "GDEY0579F51", "HX8717", "4-color", "diagnostic"),

+ 1 - 0
components/gxepd2/gxepd2_display.h

@@ -5,6 +5,7 @@
 #include "esphome/components/display/display_buffer.h"
 #include "esphome/components/spi/spi.h"
 #include "cycle_engine.h"
+#include "panel_371.h"
 #include "panel_370_tc1.h"
 #include "panel_310_gdeq031t10.h"
 #include "panel_290_t94_v2.h"

+ 108 - 0
components/gxepd2/panel_371.h

@@ -0,0 +1,108 @@
+// GENERATED by emit_descriptor from GxEPD2_371 - candidate.
+// Command sequences, plane layout and plane_invert are observed here;
+// for a packed panel bits_per_pixel/palette/blank_code are probe-filled
+// when the colour family is recognised (4-colour/7-colour), else left TODO. A
+// dual-region panel also gets plane_width and a candidate line_order; the
+// exact PAIRED_EDGES row order still wants diag/driver confirmation.
+#pragma once
+#include "epd_command.h"
+
+namespace esphome::gxepd2 {
+
+inline const uint8_t PANEL_371_INIT_0_01[] = {0x07, 0x07, 0x3F, 0x3F};
+inline const uint8_t PANEL_371_INIT_1_06[] = {0x17, 0x17, 0x1D};
+inline const uint8_t PANEL_371_INIT_3_00[] = {0x1F};
+inline const uint8_t PANEL_371_INIT_4_61[] = {0xF0, 0x01, 0xA0};
+inline const uint8_t PANEL_371_INIT_5_82[] = {0x1C};
+inline const uint8_t PANEL_371_INIT_6_50[] = {0x29, 0x07};
+inline const uint8_t PANEL_371_INIT_7_00[] = {0x3F};
+inline const uint8_t PANEL_371_INIT_8_50[] = {0x39, 0x07};
+inline const uint8_t PANEL_371_INIT_9_20[] = {0x00, 0x23, 0x00, 0x23, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+inline const uint8_t PANEL_371_INIT_10_21[] = {0x00, 0x23, 0x00, 0x23, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+inline const uint8_t PANEL_371_INIT_11_22[] = {0x48, 0x23, 0x00, 0x23, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+inline const uint8_t PANEL_371_INIT_12_23[] = {0x84, 0x23, 0x00, 0x23, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+inline const uint8_t PANEL_371_INIT_13_24[] = {0x00, 0x23, 0x00, 0x23, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+inline const uint8_t PANEL_371_INIT_14_25[] = {0x00, 0x23, 0x00, 0x23, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
+
+inline const EpdCommand PANEL_371_INIT[] = {
+    {0x01, PANEL_371_INIT_0_01, 4},
+    {0x06, PANEL_371_INIT_1_06, 3},
+    {0x04, nullptr, 0, /*delay_before_ms=*/0, /*delay_after_ms=*/0, /*wait_busy_after=*/true},
+    {0x00, PANEL_371_INIT_3_00, 1},
+    {0x61, PANEL_371_INIT_4_61, 3},
+    {0x82, PANEL_371_INIT_5_82, 1},
+    {0x50, PANEL_371_INIT_6_50, 2},
+    {0x00, PANEL_371_INIT_7_00, 1},
+    {0x50, PANEL_371_INIT_8_50, 2},
+    {0x20, PANEL_371_INIT_9_20, 42},
+    {0x21, PANEL_371_INIT_10_21, 42},
+    {0x22, PANEL_371_INIT_11_22, 42},
+    {0x23, PANEL_371_INIT_12_23, 42},
+    {0x24, PANEL_371_INIT_13_24, 42},
+    {0x25, PANEL_371_INIT_14_25, 42},
+};
+
+inline const uint8_t PANEL_371_WINDOW_SEQ0_1_90[] = {0x00, 0xEF, 0x00, 0x00, 0x01, 0x9F, 0x01};
+
+inline const EpdCommand PANEL_371_WINDOW_SEQ0[] = {
+    {0x91, nullptr, 0},
+    {0x90, PANEL_371_WINDOW_SEQ0_1_90, 7},
+};
+
+inline const uint8_t PANEL_371_REFRESH_1_01[] = {0x07, 0x07, 0x3F, 0x3F};
+inline const uint8_t PANEL_371_REFRESH_2_06[] = {0x17, 0x17, 0x1D};
+inline const uint8_t PANEL_371_REFRESH_3_00[] = {0x1F};
+inline const uint8_t PANEL_371_REFRESH_4_61[] = {0xF0, 0x01, 0xA0};
+inline const uint8_t PANEL_371_REFRESH_5_82[] = {0x1C};
+inline const uint8_t PANEL_371_REFRESH_6_50[] = {0x29, 0x07};
+inline const uint8_t PANEL_371_REFRESH_7_00[] = {0x1F};
+
+inline const EpdCommand PANEL_371_REFRESH[] = {
+    {0x92, nullptr, 0, /*delay_before_ms=*/0, /*delay_after_ms=*/1, /*wait_busy_after=*/false},
+    {0x01, PANEL_371_REFRESH_1_01, 4},
+    {0x06, PANEL_371_REFRESH_2_06, 3},
+    {0x00, PANEL_371_REFRESH_3_00, 1},
+    {0x61, PANEL_371_REFRESH_4_61, 3},
+    {0x82, PANEL_371_REFRESH_5_82, 1},
+    {0x50, PANEL_371_REFRESH_6_50, 2},
+    {0x00, PANEL_371_REFRESH_7_00, 1},
+    {0x12, nullptr, 0, /*delay_before_ms=*/0, /*delay_after_ms=*/0, /*wait_busy_after=*/true},
+};
+
+inline const uint8_t PANEL_371_POWER_OFF_0_03[] = {0x30};
+
+inline const EpdCommand PANEL_371_POWER_OFF[] = {
+    {0x03, PANEL_371_POWER_OFF_0_03, 1},
+    {0x02, nullptr, 0, /*delay_before_ms=*/0, /*delay_after_ms=*/0, /*wait_busy_after=*/true},
+};
+
+inline const uint8_t PANEL_371_HIBERNATE_0_07[] = {0xA5};
+
+inline const EpdCommand PANEL_371_HIBERNATE[] = {
+    {0x07, PANEL_371_HIBERNATE_0_07, 1},
+};
+
+inline const EpdPanelDescriptor PANEL_371 = {
+    .width = 240,
+    .height = 416,
+    .busy_active_level = false,
+    .busy_timeout_ms = 15000,  // generous diagnostic ceiling (vendor full_refresh_time 3000ms, 1bpp mono/3-colour class); dev-tunable
+    .init_sequence = PANEL_371_INIT,
+    .init_sequence_len = sizeof(PANEL_371_INIT) / sizeof(PANEL_371_INIT[0]),
+    .window_sequence = {PANEL_371_WINDOW_SEQ0, nullptr},
+    .window_sequence_len = {sizeof(PANEL_371_WINDOW_SEQ0) / sizeof(PANEL_371_WINDOW_SEQ0[0]), 0},
+    .plane_count = 1,
+    .plane_write_cmd = {0x13, 0x00},
+    .plane_invert = {false, false},  // probe-derived
+    .bits_per_pixel = 1,  // probe: white fill => all-bits wire byte 0xFF
+    .palette = nullptr,
+    .palette_len = 0,
+    .refresh_sequence = PANEL_371_REFRESH,
+    .refresh_sequence_len = sizeof(PANEL_371_REFRESH) / sizeof(PANEL_371_REFRESH[0]),
+    .power_off_sequence = PANEL_371_POWER_OFF,  // probe: powerOff(), fresh session after a normal refresh
+    .power_off_sequence_len = sizeof(PANEL_371_POWER_OFF) / sizeof(PANEL_371_POWER_OFF[0]),
+    .hibernate_sequence = PANEL_371_HIBERNATE,  // probe: hibernate()'s tail past powerOff() (see file header)
+    .hibernate_sequence_len = sizeof(PANEL_371_HIBERNATE) / sizeof(PANEL_371_HIBERNATE[0]),
+};
+
+}  // namespace esphome::gxepd2