User`s guide

AR-B1631ET User’s Guide
27/30
Show_Byte=Show_Byte|0x04; else Show_Byte=Show_Byte&0xFB;
if(Read_Byte&0x08) //GPI13
Show_Byte=Show_Byte|0x08; else Show_Byte=Show_Byte&0xF7;
if(Read_Byte&0x10) //GPI14
Show_Byte=Show_Byte|0x10; else Show_Byte=Show_Byte&0xEF;
if(Read_Byte&0x20) //GPI15
Show_Byte=Show_Byte|0x20; else Show_Byte=Show_Byte&0xDF;
if(Read_Byte&0x40) //GPI16
Show_Byte=Show_Byte|0x40; else Show_Byte=Show_Byte&0xBF;
if(Read_Byte&0x80) //GPI17
Show_Byte=Show_Byte|0x80; else Show_Byte=Show_Byte&0x7F;
if(Show_Byte==0x00)
printf("\nGPI Pins input value ==> 0x%002X",Show_Byte);
else
{ printf("\nGPI Pins input value ==> 0x%002X (should be 0x00)",Show_Byte);
printf("\n>>>>> GPI Test Error <<<<<\n"); return 1; } // return fail
printf("\n>>>>> GPI Test End <<<<<\n");
return 0; // return pass
}
/*[]=====================================================================[]*/
/*|| Function : GPO_TEST() ||*/
/*|| Input : BYTE IO_PORT_BASE ||*/
/*|| Change : - ||*/
/*|| Return : Pass return "0", Fail return "1". ||*/
/*|| Description: Test GPO Pins status. ||*/
/*[]=====================================================================[]*/
int GPO_TEST(BYTE IO_PORT_BASE)
{
// Set W83627HF GPIO10~17 to Output
outportb(IO_PORT_BASE,0xF0);
outportb(IO_PORT_BASE+1,0x00);
printf(">>>>> GPO Test Start <<<<<");
/////// Output High Test /////////////////////////////////////////////////
printf("\nSet GPO Pins to High ...............");
// Set W83627HF GPIO10~17 to High
outportb(IO_PORT_BASE,0xF1);
outportb(IO_PORT_BASE+1,0xFF);
printf("\nGPO Pins is High ? [Y/N] ........... ");
if(YES_NO_Confirm() =='n')
{ printf("\n>>>>> GPO Test Error <<<<<\n"); return 1; } // return fail
/////// Output Low Test //////////////////////////////////////////////////
printf("\nSet GPO Pins to Low ................");