View Single Post
javispedro's Avatar
Posts: 2,355 | Thanked: 5,249 times | Joined on Jan 2009 @ Barcelona
#596
Originally Posted by thp View Post
Do you have some example code or links to documentation on how to "manually" tell the omapfb to refresh?
Something like....

Code:
static int omapFd;
static void omapfbFlush()
{
	struct omapfb_update_window u;

	u.x = 80;
	u.y = 60;
	u.out_x = u.x;
	u.out_y = u.y;
	u.width = 720;
	u.height = 420;
	u.out_width = u.width;
	u.out_height = u.height;
	u.format = OMAPFB_COLOR_RGB565;

	int res = ioctl(omapFd, OMAPFB_UPDATE_WINDOW, &u);
	if (res != 0) {
		printf("omapfb flush failed\n");
	}
}
static void init() {
	omapFd = open("/dev/fb0", O_RDWR);
	if (omapFd < 0) {
		printf("Failed to open omap fd\n");
	}
}
static void fini() {
	close(omapFd);
}
 

The Following 5 Users Say Thank You to javispedro For This Useful Post: