Acrosser AR-B1631ET User Manual
Page 28
AR-B1631ET User’s Guide
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);
return(0);
}
/*[]=====================================================================[]*/
/*|| Function
: Show_Title()
||*/
/*||
Input
:
-
||*/
/*|| Change
: -
||*/
/*|| Return : -
||*/
/*|| Description: Show Title string.
||*/
/*[]=====================================================================[]*/
void Show_Title()
{
clrscr();
printf("GPIO Control test for W83627HF\n");
printf("1. GPIO.EXE I ==--> Test GPI.\n");
printf("2. GPIO.EXE O ==--> Test GPO.\n");
}
/*[]=====================================================================[]*/
/*||
Function
:
YES_NO_Confirm()
||*/
/*||
Input
:
-
||*/
/*|| Change
: -
||*/
28/30
/*|| Return : character 'y' or 'n'
||*/