summaryrefslogtreecommitdiffstats
path: root/eink_full_update.c
blob: 396de57256f238e4b2845cabfe2f9585f586abfb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <stdio.h>
#include <sys/ioctl.h>
#include <fcntl.h>	
#include "mxcfb.h"
#include <linux/fb.h>


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_FULL;

	
	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.\n");
	}
	return 0;
}