View Single Post
Old 10-18-2009, 08:56 AM   #156
Antartica
Evangelist
Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.Antartica ought to be getting tired of karma fortunes by now.
 
Antartica's Avatar
 
Posts: 423
Karma: 1517132
Join Date: Jun 2006
Location: Madrid, Spain
Device: quaderno, remarkable2, yotaphone2, prs950, iliad, onhandpc, newton
Quote:
Originally Posted by ericshliao View Post
I am trying to create a simple program so that I can call it to do a full-screen refresh in shell. The following code are borrowed from your xepdmgr. I can compile it with gcc without problem, but I haven't really tried it on my iLiad.
Please comment on the following code if it will provide what I want.
It looks OK for me. One minor thing: you forgot to close() the file descriptor after the ioctl. That is:
Code:
...
	int fd;
	if((fd=open("/dev/fb0",O_RDWR))!=-1){
		ioctl(fd, FBIO_ERASE_WHITE, &Update);
		close(fd);
	}
    return(0);
}
Just for reference, there is one advantage to use displayMgr to manage the update instead of doing it directly like this: displayMgr will make sure that you don't update the display too fast for the driver to handle it (although I don't know if that is important).

BUT bear in mind that xepdmgr cannot be used without X; OTOH plain displayMgr can.
Antartica is offline   Reply With Quote