Quote:
Originally Posted by ericshliao
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.