Advantech PCI-1602 Dokumentacja Strona 86

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 89
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 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() */
Przeglądanie stron 85
1 2 ... 81 82 83 84 85 86 87 88 89

Komentarze do niniejszej Instrukcji

Brak uwag