Skip to content

Commit

Permalink
feat(IL0323): Add alternative partial refresh option
Browse files Browse the repository at this point in the history
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".
  • Loading branch information
caksoylar committed Jan 19, 2024
1 parent f26b29f commit 748b071
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/module/drivers/display/Kconfig.il0323
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,7 @@ config IL0323
config IL0323_INVERT
bool "Invert display"
default n

config IL0323_ALTERNATIVE_REFRESH
bool "Use an alternative approach for partial refreshes"
default n
4 changes: 4 additions & 0 deletions app/module/drivers/display/il0323.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,11 @@ static int il0323_write(const struct device *dev, const uint16_t x, const uint16
ptl[IL0323_PTL_HRED_IDX] = x_end_idx;
ptl[IL0323_PTL_VRST_IDX] = y;
ptl[IL0323_PTL_VRED_IDX] = y_end_idx;
#if IS_ENABLED(CONFIG_IL0323_ALTERNATIVE_REFRESH)
ptl[sizeof(ptl) - 1] = 0; // limits fading outside of refresh window
#else
ptl[sizeof(ptl) - 1] = IL0323_PTL_PT_SCAN;
#endif
LOG_HEXDUMP_DBG(ptl, sizeof(ptl), "ptl");

il0323_busy_wait(cfg);
Expand Down

0 comments on commit 748b071

Please sign in to comment.