Skip to content

Commit cef937b

Browse files
committed
feat(IL0323): Add alternative partial refresh option
Adds Kconfig to enable the alternative partial refresh setting from @aumuell: "Gates scan only inside of the partial window" instead of setting PTL_SCAN when configuring the window for partial refreshes seems to limit degrading of areas outside the refresh window quite a bit. But https://github.com/CursedHardware/epd-driver-ic/blob/master/IL0323.pdf, p. 26 states that this is not the "default".
1 parent 754da74 commit cef937b

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

app/module/drivers/display/Kconfig.il0323

+4
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,7 @@ config IL0323
1313
config IL0323_INVERT
1414
bool "Invert display"
1515
default n
16+
17+
config IL0323_ALTERNATIVE_REFRESH
18+
bool "Use an alternative approach for partial refreshes"
19+
default n

app/module/drivers/display/il0323.c

+4
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,11 @@ static int il0323_write(const struct device *dev, const uint16_t x, const uint16
124124
ptl[IL0323_PTL_HRED_IDX] = x_end_idx;
125125
ptl[IL0323_PTL_VRST_IDX] = y;
126126
ptl[IL0323_PTL_VRED_IDX] = y_end_idx;
127+
#if IS_ENABLED(CONFIG_IL0323_ALTERNATIVE_REFRESH)
128+
ptl[sizeof(ptl) - 1] = 0; // limits fading outside of refresh window
129+
#else
127130
ptl[sizeof(ptl) - 1] = IL0323_PTL_PT_SCAN;
131+
#endif
128132
LOG_HEXDUMP_DBG(ptl, sizeof(ptl), "ptl");
129133

130134
il0323_busy_wait(cfg);

0 commit comments

Comments
 (0)