Aplex Technology AHM-6086A User Manual
Page 58

AHM-6XX6A User Manual
57
WRITEREG(0x30, (inportb(0x30)|0x2))
WRITEREG(0xE6, 0x0)
WRITEREG(0xE4, 0xFF)
//Exit the super I/O chip programming
EXITPRG
return 0;
}
//Initialize the GPIO port6
int InitGP6() {
//Start the super I/O chip programming
ENTERPRG
//Select the logical device 8, GP6
SELETDEV(8)
//Activate GP1
WRITEREG(0x30, (inportb(0x30)|0x4))
WRITEREG(0xE6, 0x0)
WRITEREG(0xE4, 0xF0)
//Exit the super I/O chip programming
EXITPRG
return 0;
}
//Read GPIO Port2
unsigned char ReadGP2() {
unsigned char cGP2;
//Start the super I/O chip programming
ENTERPRG