System Installation
WADE-8021 User’s Manual
3-2
return(d2);
}
int main(void)
{
unsigned char d2;
printf("\n\n");
printf("WADE-8321 GPIO TEST Program v1.0\n");
printf("Please short the following pins with 2.54mm-pitched jumper on JP11\n");
printf("P.S: SIO: IT8728, ITE\n");
printf("PIN 1,3,5,7 is output ; PIN 2,4,6,8 is input\n");
printf("GPIO70 (JP11 PIN 1) ---- GPIO74 (JP11 PIN 2)\n");
printf("GPIO71 (JP11 PIN 3) ---- GPIO75 (JP11 PIN 4)\n");
printf("GPIO72 (JP11 PIN 5) ---- GPIO76 (JP11 PIN 6)\n");
printf("GPIO73 (JP11 PIN 7) ---- GPIO77 (JP11 PIN 8)\n");
printf("GND (JP11 PIN 9) xxxx VCC (JP11 PIN 10)<==PWR/GND pins, DON'T
short them!\n\n");
printf("Test Begins...\n");
enter_Superio2_CFG();
/* Parallet port disable */
Set_CFG2 (0x07, 0x03);
Set_CFG2 (0x30, 0x00);
/* Set LDN => 07h */
Set_CFG2 (0x07, 0x07);
/* Bus Selection */
d2 = Get_CFG2 (0xE9) | 0x20; /* Bus selection disable, bit5=1*/
Set_CFG2 (0xE9, 0x20);
/* Set GPIO Port In/Out mode */
Set_CFG2 (0xCE, 0x0F); /* Port 70~73 Out mode, 74~77 In mode*/
delay (5);
/* Read Base Address */
#if DEBUG
d2 = Get_CFG2 (0x62);
printf ("0x62: %x\n", d2);
d2 = Get_CFG2 (0x63);
printf ("0x63: %x\n", d2);
#endif
/* Set GP70~73 Low, 74~77 High GPIO7=a00+6 */