rendered paste body#include <sys/types.h>
#include <sys/ioctl.h>
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <signal.h>
#include <errno.h>
#include <fcntl.h>
#include <linux/fb.h>
#include <asm/arch-omap/omapfb.h>
/* #define OMAP_IOW(num, dtype) _IOW('O', num, dtype) */
/* #define OMAPFB_UPDATE_WINDOW OMAP_IOW(47, struct omapfb_update_window) */
/* #define OMAPFB_UPDATE_WINDOW_OLD OMAP_IOW(41, struct omapfb_update_window_old) */
/* #define OMAPFB_SET_UPDATE_MODE OMAP_IOW(40, int) */
/* enum omapfb_update_mode { */
/* OMAPFB_UPDATE_DISABLED = 0, */
/* OMAPFB_AUTO_UPDATE, */
/* OMAPFB_MANUAL_UPDATE */
/* }; */
int main()
{
typedef enum omapfb_update_mode update_mode;
update_mode updateMode;
updateMode = OMAPFB_AUTO_UPDATE;
int infd = open( "/dev/fb0", O_RDWR);
if (infd > 0) {
if (ioctl( infd, OMAPFB_SET_UPDATE_MODE, &updateMode) < 0) {
perror("ioctl(OMAPFB_SET_UPDATE_MODE)");
}
close(infd);
} else {
printf("NOPT!@\n");
}
return 0;
}