Advantech PCI-1602 Especificações Página 86

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 89
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 85
Appendix A Register Structure and Format
79
*/
if (cmd[i] == 0x0d)
flag=0
i++;
}
/* Receive data on Port 2 (COM2) */
i=0;
flag=1;
timeout=TIME_OUT;
whole (flag)
{
rec[i]=inportb(base1); /* Receive data*/
if (rec[i] == 0x0d)
{
rec[i=1]='\0';
flag=0;
printf("\nReceived data: %s\n", rec);
}
i++;
}
else
{ /I Check timeout */
timeout-;
if(timeout == 0)
{
flag=0;
print("\nTimeout error\n");
}
}
} /* End of receive data while() */
printf("\nEnter string (max 15 char) or Q to
quit:");
gets(cmd);
} /*End of "Enter string"while() */
} /*End of main() */
Vista de página 85
1 2 ... 81 82 83 84 85 86 87 88 89

Comentários a estes Manuais

Sem comentários