Acrosser AR-B1622 Manual do Utilizador Página 23

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 26
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 22
AR-B1622 User’s Guide
23
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;
if ( argc != 2 )
Vista de página 22
1 2 ... 18 19 20 21 22 23 24 25 26

Comentários a estes Manuais

Sem comentários