Acrosser AR-B1631 Manuel d'utilisateur Page 23

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 26
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 22
AR-B1631 User’s Guide
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 ................");
// 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;
23
Vue de la page 22
1 2 ... 18 19 20 21 22 23 24 25 26

Commentaires sur ces manuels

Pas de commentaire