Query:How to change brightness of a screen(framebuffer) using Qtopia ?
Hi All,
I have been developed a GUI for WIreless access point which is displaying on the LCD(framebuffer) screen, that GUI has LCD settings options like brightness, contrast and sharpness.
Here when I run GUI the Qtopia will open framebuffer device and writes GUI data to it, So how can I get that file descriptor to call proper ioctl's in my program to change brightness, contrast and sharp. Or otherwise can I open the same framebuffer device again and use that file descriptor?
Please help out on this issue.
Thanks in advance
Suresh S Gani
Re: Query:How to change brightness of a screen(framebuffer) using Qtopia ?
Hi,
I was able to access the device directly using the /dev/fb. This is a simple routine for blanking the LCD.
Code:
int lcdBlank(bool val)
{
int fbfd;
int blank = 0;
int ret = 0;
if(val == true)
blank = FB_BLANK_POWERDOWN;
else
blank = FB_BLANK_UNBLANK;
fbfd = open(FBDEVFILE, O_RDWR);
if(fbfd < 0)
{
printf("Could Not Open FB for blanking\n");
return -1;
}
ret = ioctl(fbfd,FBIOBLANK, &blank);
if (ret < 0)
printf("Could not exe IOCTL for blanking lcd\n");
close(fbfd);
return ret;
}