Advantech RSB-4210 Evaluation Kit Instrukcja Użytkownika Strona 76

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 104
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 75
RSB-4210 User Manual 68
/* Read in and wrap around the list */
iores = read(fd, rx, iocount);
rcount += iores;
fwrite(rx, 1, iores, furead);
free(rx);
}
return 0;
}
static void print_usage(const char *pname)
{
printf("Usage: %s device [-S] [-O] [-E] [-HW] [-B bau-
drate]"
"\n\t'-S' for 2 stop bit"
"\n\t'-O' for PARODD "
"\n\t'-E' for PARENB"
"\n\t'-HW' for HW flow control enable"
"\n\t'-B baudrate' for different baudrate\n",
pname);
}
int main(int argc, char *argv[])
{
int i, ret;
struct termios options;
unsigned long baudrate = DEFAULT_RATE;
char c = 0;
pthread_t p_Uartsend, p_Uartread;
void *thread_res;
if (argc < 2 || strncmp(argv[1], "/dev/ttymxc", 11)) {
print_usage(argv[0]);
return -1;
}
fd = open(argv[1], O_RDWR | O_NOCTTY);
if (fd == -1) {
printf("open_port: Unable to open serial port - %s",
argv[1]);
return -1;
}
fcntl(fd, F_SETFL, 0);
Przeglądanie stron 75
1 2 ... 71 72 73 74 75 76 77 78 79 80 81 ... 103 104

Komentarze do niniejszej Instrukcji

Brak uwag