Owner manual

AR-B1631ET User’s Guide
28/30
// Set W83627HF GPIO10~17 to Low
outportb(IO_PORT_BASE,0xF1);
outportb(IO_PORT_BASE+1,0x00);
printf("\nGPO Pins is Low ? [Y/N] ............ ");
if(YES_NO_Confirm() =='n')
{ printf("\n>>>>> GPO Test Error <<<<<\n"); return 1; } // return fail
printf("\n>>>>> GPI Test End <<<<<\n");
return 0; // return pass
}
/*[]=====================================================================[]*/
/*|| Main procedure ||*/
/*[]=====================================================================[]*/
int main(int argc, char *argv[])
{
BYTE IO_PORT_BASE=0x2E; // DATA_PORT = IO_PORT_BASE + 1;
int result;
if ( argc != 2 )
{ Show_Title(); return 1; }
clrscr();
// Enter W83627HF Config
Enter_Config(IO_PORT_BASE);
Init_SIO(IO_PORT_BASE);
switch(argv[1][0])
{
case 'i':
case 'I': //I Key
result=GPI_TEST(IO_PORT_BASE);
if(result==0)
printf("Test Result is Pass.");
else
printf("Test Result is Fail.");
break;
case 'o':
case 'O': //O Key
result=GPO_TEST(IO_PORT_BASE);
if(result==0)
printf("Test Result is Pass.");
else
printf("Test Result is Fail.");
break;
} //switch end
// Exit W83627HF Config
Exit_Config(IO_PORT_BASE);