From c7cb971cd394ac9c66174a3c07e50bfc4fcd6e7a Mon Sep 17 00:00:00 2001 From: root Date: Mon, 28 Dec 2015 11:26:32 +0000 Subject: original framebuffer-utils for kobo-mini from marek --- eink_full_monochrome.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 eink_full_monochrome.c (limited to 'eink_full_monochrome.c') diff --git a/eink_full_monochrome.c b/eink_full_monochrome.c new file mode 100644 index 0000000..da4ecaa --- /dev/null +++ b/eink_full_monochrome.c @@ -0,0 +1,28 @@ +#include +#include +#include +#include "mxcfb.h" +#include + + +int main(int argc, char *argv[]) +{ + struct mxcfb_update_data update_data = { + 0, 0, 800, 600, + WAVEFORM_MODE_AUTO, + }; + update_data.update_mode = UPDATE_MODE_PARTIAL; + update_data.flags = EPDC_FLAG_FORCE_MONOCHROME; + + + int framebuffer = open("/dev/fb0", O_RDWR); /* 0_RDONLY */ + if (framebuffer != -1) + { + ioctl(framebuffer, MXCFB_SET_UPDATE_SCHEME, UPDATE_SCHEME_QUEUE); + ioctl(framebuffer, MXCFB_SEND_UPDATE, &update_data); + close(framebuffer); + + printf("E-ink display fully updated (monochrome).\n"); + } + return 0; +} -- cgit v1.2.3