Aplex Technology ACS-2645 User Manual

Page 57

Advertising
background image

ACS-2645 User Manual

57

//Start the super I/O chip programming

ENTERPRG

//Select the logical device 8, GP6

SELETDEV(8)

//Write GP1 value

WRITEREG(0xE5, cGP6)

//Exit the super I/O chip programming

EXITPRG

return 0;

}

int main() {

unsigned char cGP;

//Initialize the GPIO port

InitGP2();

InitGP6();

//Read GPIO Port 2

cGP = ReadGP2();

printf("\nRead GPIO Port 2 Status: %X", cGP);

//Write GPIO Port 6

WriteGP6(cGP);

printf("\nSet GPIO Port 6 Status: %X", cGP);

return 0;

Advertising