#include #include #include #include "mxcfb.h" #include int main (int argc, char *argv[]) { struct fb_var_screeninfo info = { 0 }; struct mxcfb_update_data update_data = { 0 }; int fd; fd = open ("/dev/fb0", O_RDWR); if (fd == -1) { perror ("open"); return 1; } if (ioctl (fd, FBIOGET_VSCREENINFO, &info)) { perror ("FBIOGET_VSCREENINFO"); return 1; } update_data.waveform_mode = WAVEFORM_MODE_AUTO, update_data.update_region.width = info.xres_virtual ? info.xres_virtual : info.xres; update_data.update_region.height = info.yres_virtual ? info.yres_virtual : info.yres; update_data.update_mode = UPDATE_MODE_FULL; ioctl (fd, MXCFB_SET_UPDATE_SCHEME, UPDATE_SCHEME_QUEUE); ioctl (fd, MXCFB_SEND_UPDATE, &update_data); close (fd); printf ("E-ink display fully updated.\n"); return 0; }