diff options
author | root <root@no.no.james.local> | 2015-12-28 11:26:32 +0000 |
---|---|---|
committer | root <root@no.no.james.local> | 2015-12-28 11:26:32 +0000 |
commit | c7cb971cd394ac9c66174a3c07e50bfc4fcd6e7a (patch) | |
tree | e3ebaf749e5b8cf87ee625b0e89e1279532a4446 /eink_enable_autoupdate.c | |
download | kobo-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.c | 22 |
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; +} + |