#GMaster_backlight+vee
Graphics Master Backlight and Vee Control
On the Graphics Master, the SA-1111 companion chip controls Vee (contrast control voltage for passive LCD displays) and the backlight. The driver is named "SAM1:".
The SA-1111 drives two PWM outputs whose duty cycle can be varied from 0 to 100% in 256 steps. The driver has the flexibility to increase and decrease the present output level by a specified step size (eg. when a user presses +/- buttons to change the intensity) or it can set an absolute level.
The driver uses DeviceIoControl() calls to configure output. It accepts one-byte values as described in the following table:
Control Code Code Value Description
------------------------- ------ ----- -------------------------
IOCTL_SET_BACKLIGHT_UP 0x00 0-FF Increase by step given
IOCTL_SET_BACKLIGHT_DOWN 0x01 0-FF Decrease by step given
IOCTL_SET_BACKLIGHT_ON 0x02 0 Turn on; parameter unused
IOCTL_SET_BACKLIGHT_OFF 0x03 0 Turn off; parameter unused
IOCTL_SET_BACKLIGHT_LEVEL 0x04 0-FF Set level
IOCTL_SET_VEE_UP 0x10 0-FF Increase by step given
IOCTL_SET_VEE_DOWN 0x11 0-FF Decrease by step given
IOCTL_SET_VEE_LEVEL 0x14 0-FF Set level
.
Eg.
hPort = CreateFile(TEXT("SAM1:"),GENERIC_READ|GENERIC_WRITE,0,NULL,OPEN_EXISTING,0,NULL);
bRet = DeviceIoControl(hPort,IOCTL_SET_BACKLIGHT_OFF,NULL,0,NULL,0,&ulBytesRet,NULL);
------------------
ADS Knowledge Base