Skip to content

Commit ec37895

Browse files
committed
Use NOOK hardware EPD refresh to fix e-ink ghosting
1 parent bee5818 commit ec37895

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

src/com/bpmct/trmnl_nook_simple_touch/DisplayActivity.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -900,6 +900,8 @@ private void updateMenuBattery() {
900900
}
901901

902902
private void forceFullRefresh() {
903+
triggerEpdRefresh();
904+
903905
if (imageRotateLayout != null) {
904906
imageRotateLayout.requestLayout();
905907
imageRotateLayout.invalidate();
@@ -918,6 +920,18 @@ public void run() {
918920
}
919921
}, 40);
920922
}
923+
924+
/** Trigger NOOK Simple Touch hardware e-ink refresh via sysfs. */
925+
private void triggerEpdRefresh() {
926+
try {
927+
java.io.FileWriter fw = new java.io.FileWriter(
928+
"/sys/devices/platform/omap3epfb.0/graphics/fb0/epd_refresh");
929+
fw.write("1");
930+
fw.close();
931+
} catch (Exception e) {
932+
// Silently fail - fall back to Android refresh
933+
}
934+
}
921935

922936
private void refreshContentAfterMenu() {
923937
if (imageView != null && imageView.getVisibility() == View.VISIBLE) {

0 commit comments

Comments
 (0)