blob: da4ecaaffc25c1da2d32ac5f415e9598dc995553 (
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_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;
}
|