summaryrefslogtreecommitdiffstats
path: root/eink_enable_autoupdate.c
diff options
context:
space:
mode:
authorroot <root@no.no.james.local>2015-12-28 11:26:32 +0000
committerroot <root@no.no.james.local>2015-12-28 11:26:32 +0000
commitc7cb971cd394ac9c66174a3c07e50bfc4fcd6e7a (patch)
treee3ebaf749e5b8cf87ee625b0e89e1279532a4446 /eink_enable_autoupdate.c
downloadkobo-tools-c7cb971cd394ac9c66174a3c07e50bfc4fcd6e7a.tar.gz
kobo-tools-c7cb971cd394ac9c66174a3c07e50bfc4fcd6e7a.tar.bz2
kobo-tools-c7cb971cd394ac9c66174a3c07e50bfc4fcd6e7a.zip
original framebuffer-utils for kobo-mini from marek
Diffstat (limited to 'eink_enable_autoupdate.c')
-rw-r--r--eink_enable_autoupdate.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/eink_enable_autoupdate.c b/eink_enable_autoupdate.c
new file mode 100644
index 0000000..3742115
--- /dev/null
+++ b/eink_enable_autoupdate.c
@@ -0,0 +1,22 @@
+#include <stdio.h>
+#include <sys/ioctl.h>
+#include <fcntl.h>
+#include "mxcfb.h"
+#include <linux/fb.h>
+
+
+
+int main(int argc, char *argv[])
+{
+ int mode = AUTO_UPDATE_MODE_AUTOMATIC_MODE;
+ int framebuffer = open("/dev/fb0", O_RDWR); /* 0_RDONLY */
+ if (framebuffer != -1)
+ {
+ ioctl(framebuffer, MXCFB_SET_AUTO_UPDATE_MODE, &mode);
+ close(framebuffer);
+
+ printf("E-ink display autoupdate enabled.\n");
+ }
+ return 0;
+}
+