C: b, Ppendix, Rightness – NEXCOM NEX 608 User Manual
Page 67: Ontrol, Rogramming, Ample
Copyright © 2011 NEXCOM International Co., Ltd. All Rights Reserved.
54
NEX 608 User Manual
Appendix C: Brightness Control Programming Sample Code
A
ppendix
C: B
rightness
C
ontrol
p
rogrAmming
s
Ample
C
ode
Brightness Control Programming Sample Code
#define SUPERIO_PORT
0x2E
#define GPIO_LEVEL
0xF1
#define GPO31
(0x01 << 1)
#define GPO34
(0x01 << 4)
#define GPO35
(0x01 << 5)
#define Set_100
{ outportb(SUPERIO_PORT, GPIO_LEVEL); outportb(SUPERIO_PORT+1, 0x7D); }
#define Set_80
{ outportb(SUPERIO_PORT, GPIO_LEVEL); outportb(SUPERIO_PORT+1, 0x6F); }
#define Set_60
{ outportb(SUPERIO_PORT, GPIO_LEVEL); outportb(SUPERIO_PORT+1, 0x5F); }
#define Set_40
{ outportb(SUPERIO_PORT, GPIO_LEVEL); outportb(SUPERIO_PORT+1, 0x7F); }
void main(void)
{
#Enter SuperIO Configuration
outportb(SUPERIO_PORT, 0x87);
outportb(SUPERIO_PORT, 0x87);
# Set LDN
outportb(SUPERIO_PORT,0x07);
outportb(SUPERIO_PORT+1 ,0x09);
Set_80;
# Choose one of Set_100, Set_80, Set_60,
Set_40 .
}